हिंदी

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 + - Computer Applications

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)); 
संक्षेप में उत्तर

उत्तर

Computer WorldequalsCOMPUTER WORLD false

Computer WorldequalsComputer world false

Computer Worldequalscomputer world false

Computer WorldequalsIgnoreCasecomputer world true

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 4: String Handling - EXERCISES [पृष्ठ २८८]

APPEARS IN

अविचल Computer Applications [English] Class 10 ICSE
अध्याय 4 String Handling
EXERCISES | Q IV. 7. | पृष्ठ २८८
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×