हिंदी

State the output of the following program segment: String str1 = "great"; String str2 = "minds"; System.out.println(str1.substring(0,2).concat(str2.substring(1))); Systern.out.println(("WH" + - Computer Applications

Advertisements
Advertisements

प्रश्न

State the output of the following program segment:

String str1 = "great"; String str2 = "minds"; 
System.out.println(str1.substring(0,2).concat(str2.substring(1))); 
Systern.out.println(("WH" + (str1.substring(2).toUpperCase()))); 
लघु उत्तरीय

उत्तर

The output of the program segment is as follows:

grinds
WHEAT

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

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×