Admin Dashboard

Result for: Pratima Tanaji Salgar

Exam Name Java Basic with OOP
Total Marks 15.0
Score 14.0
Percentage 93.33%
Question Analysis
Sr. No. Question Selected Answer Correct Answer
1 Which of the following is a primitive data type in Java? char 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? byte can be automatically type converted to int. 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 + " "); } } 10 20 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? equalsIgnoreCase() equalsIgnoreCase()
12 Which of the following classes is not thread-safe? StringBuilder StringBuilder
13 Which operator can be used to concatenate two or more String objects? + +
14 Which access modifier makes a member accessible only within its own class? private private
15 What is Java? All above All above
Page 1
Admin Dashboard