Vidyalelo
Java Programming · Q90

Miscellaneous Java

Programming · Java Programming · question 90

Q90

What will be the output of the following Java program? class string_class public static void main(String args[]) String obj = "hello"; String obj1 = "world"; String obj2 = "hello"; System.out.println(obj.equals(obj1) + " " + obj.equals(obj2));

A.
false false
B.
true true
C.
true false
D.
false true
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board