मराठी

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×