English

State the values stored in the variable str1 and str2. String s1 = "good"; String s2 = "world matters"; String str1 = s2.substring(5).replace('t', 'n'). String str2 = s1.concat(strl1); - Computer Applications

Advertisements
Advertisements

Question

State the values stored in the variable str1 and str2.

String s1 = "good"; String s2 = "world matters";
String str1 = s2.substring(5).replace('t', 'n').
String str2 = s1.concat(strl1);  

Short Answer

Solution

Value of the variable str1 is: manners
Value of variable str2 is: good manners 

shaalaa.com
  Is there an error in this question or solution?
Chapter 4: String Handling - Review Insight [Page 284]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 4 String Handling
Review Insight | Q 5. | Page 284
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×