Advertisements
Advertisements
प्रश्न
Predict the output of the following:
String S1 = "Computer World";
String S2 = "COMPUTER WORLD";
String S3 = "Computer world";
String S4 = "computer world";
System.out.println(S1 + "equals"+ S2 + " " + S1.equals(S2));
System.out.println(S1 + "equals"+ S3 + " " + S1.equals(S3));
System.out.println(S1 + "equals"+ S4 + " " + S1.equals(S4));
System.out.println(S1 + "equalslgnoreCase"+ S4 + " " + S1.equalslgnoreCase(S4));
संक्षेप में उत्तर
Advertisements
उत्तर
Computer WorldequalsCOMPUTER WORLD false
Computer WorldequalsComputer world false
Computer Worldequalscomputer world false
Computer WorldequalsIgnoreCasecomputer world true
shaalaa.com
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
