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?
