Java Programming - Java.lang Class - Discussion
Discussion Forum : Java.lang Class - Finding the output (Q.No. 27)
27.
What will be the output of the program?
String s = "hello";
Object o = s;
if( o.equals(s) )
{
System.out.println("A");
}
else
{
System.out.println("B");
}
if( s.equals(o) )
{
System.out.println("C");
}
else
{
System.out.println("D");
}
- A
- B
- C
- D
Discussion:
11 comments Page 2 of 2.
Hrishi said:
2 decades ago
I want to learn basic of java upto multithreading.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers