Monday, February 16, 2009

Try this example

public class StringApps {
public static void main(String[] args){
String s = "abc";
String s2 = new String("abc");
if(s==s2)
{ System.out.println("references are equal"); }
else
{ System.out.println("references are not equal"); }
}}

what will be the output

No comments:

Post a Comment