Result for: Lochani Wankhade
Exam Details
Download Result (PDF)Question Analysis
| Sr. No. | Question | Selected Answer | Correct Answer |
|---|---|---|---|
| 1 | Which of the following is a primitive data type in Java? | Integer | char |
| 2 | Which data type is used to store true or false values? | boolean | boolean |
| 3 | Which of these statements about type conversion is correct? | An expression involving byte, int, and short is promoted to long before calculation. | byte can be automatically type converted to int. |
| 4 | What is the output of the following code? int x = 5; System.out.println(x++ + ++x); | 12 | 11 |
| 5 | Which of these are selection statements in Java? | if | if |
| 6 | What is the return type of a constructor in Java? | no return type | no return type |
| 7 | What is the primary purpose of the this keyword in Java? | To refer to the current instance (object) of the class | To refer to the current instance (object) of the class |
| 8 | class Test1 { public static void main(String[] args) { int x = 20; System.out.println(x); } static { int x = 10; System.out.print(x + " "); } } | 20 10 | 10 20 |
| 9 | Which of these methods of the String class is used to obtain the length of a String object? | length() | length() |
| 10 | What will be the output of the following code? String s1 = "Hello"; String s2 = "Hello"; System.out.println(s1 == s2); | true | true |
| 11 | Which method is used to compare two strings for equality while ignoring case differences? | No answer selected | equalsIgnoreCase() |
| 12 | Which of the following classes is not thread-safe? | No answer selected | StringBuilder |
| 13 | Which operator can be used to concatenate two or more String objects? | No answer selected | + |
| 14 | Which access modifier makes a member accessible only within its own class? | No answer selected | private |
| 15 | What is Java? | No answer selected | All above |
Page 1