Software Programming : Java Programming QUESTIONS AND ANSWERS :: part11 : 1 to 5
Following Software Programming language Entrance Multiple choice objective type questions and answers will help you in Software Programming 2024 examinations :
1.Use the following declarations and initializations to evaluate the Java expressions: (Please note that each expression has been tested separately.) int i=3, j=7, k=11; ++k –i +i + i++ |
16 |
17 |
14 |
13 |
15. |
2.Which of the following assignment statement(s) is/are correct? I. char c = 'd'; II. char c = 100; III. char c = "d"; IV. char c = "100"; |
Only (I) above |
Only (II) above |
Both (I) and (II) above |
Both (II) and (III) above |
Both (III) and (IV) above. |
3.Use the following declarations and initializations to evaluate the Java expressions: (Please note that each expression has been tested separately.) int i=3, j=7, k=11; #7) j + k % i |
9 |
0 |
7 |
12 |
10. |
4.Consider the following variable declarations: int i;float j; boolean k; Which of the following is correct initialization? |
i = 1; j = 1.0; k = true; |
i = 1; j = 1.0f; k = true; |
i = 1; j = 1.0f; k = “true”; |
i = 1; j = 1.0; k = “true”; |
i = 1; j = 1.0f; k = True; |
5.Consider the following segment of a Java program: int x=1; switch(x) {case 0:System.out.println(x);break; case 1:System.out.println(x);break; case 2:System.out.println(x); default: System.out.println(x); } What will the output be when the above segment is executed as a program? |
0 |
1 |
2 |
1 1 |
error |
More Java Programming QUESTIONS AND ANSWERS available in next pages
-
Health is the greatest gift, contentment is the greatest wealth -Buddha
- TNTET 2021 - Practice
- SSC CGL 2021 - Practice
- TNPSC Group 2A 2021 - Practice
- IIT JEE
- IIT JEE Q&A
- TNPSC Answer Keys
- TNPSC Group 2 Syllabus
- TNPSC Q&A
- Online Tests - TNPSC
- Online Tests - GK
- IBPS 2020-2021
- Online Tests - Bank
- Online Tests - RRB NTPC
- Online Tests - UGC NET
- Online Tests - TANCET
- Online Aptitude Test
- Engineering
- Programming
- Basic Science
- Quiz
- Plus Two Question Papers
- SSLC Question Bank
- Aptitude Tests
- Logical Reasoning
- General Knowledge-Hindi
- Indian History MCQ
- Indian Geography MCQ
- Indian Civics MCQ
- Indian Economics MCQ
- CTET Biology MCQ
- CTET Chemistry MCQ
- CTET Physics Solved MCQ
- Arithmetic Tests
- Press Release
- FAQ
- Coaching Centres
- TNPSC Group 1 Syllabus
- TNPSC Group IV Syllabus
- TRB 2017 in English PDF
- TRB 2017 in Tamil PDF
- TET
- TNTET