English

State the output when the following program segment is executed: String a = "Smartphone", b = "Graphic Art"; String h = a.substring(2, 5); String k = b.substring(S).toUpperCase();

Advertisements

Question

State the output when the following program segment is executed:

String a = "Smartphone", b = "Graphic Art"; 
String h = a.substring(2, 5); 
String k = b.substring(S).toUpperCase(); 
System.out.println(h); 
System.out.println(k.equalsignoreCase(h)); 
Short Answer
Advertisements

Solution

Output:
art
true

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

APPEARS IN

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



      Forgot password?
Use app×