Admin Dashboard

Result for: Achal Hiwarkar

Exam Name Java Basic with OOP
Total Marks 15.0
Score 4.0
Percentage 26.67%
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); 10 11
5 Which of these are selection statements in Java? No answer selected 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? No answer selected 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 + " "); } } No answer selected 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); No answer selected true
11 Which method is used to compare two strings for equality while ignoring case differences? equalsIgnoreCase() 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
Admin Dashboard