You are not logged in.

#1 2015-06-10 09:42:10

husnain
User RankUser RankUser RankUser RankUser RankUser Rank
Administrator
From: Chichawatni,Pakistan
Registered: 2014-10-03
Posts: 8,129
Website

What would be output?

Question:
String a = "Hello World";
String b = "Hello World";
System.out.println(a.equals(b));
System.out.print(a==b);
System.out.print(a == b.intern());

What would be output?

Option A):
true true true
Option B):
Compile time error
Option C):
true false true
Option D):
True false false

Correct Answer is Option A):
true true true


You cannot discover the new oceans unless you have the courage to lose the sight of the shore.

2015-06-10 09:42:10

Advertisement
Ads By Google

Re: What would be output?



\n

Board footer