English

Write the output of the codes given below. String sw = “Pharaoh-Meant-King"; String sy = sw.substring(0, 5).toUpperCase();: String sz = sw.substring(5).toLowerCase(); System.out.println(" SY = " + sy)

Advertisements
Advertisements

Question

Write the output of the codes given below.

String sw = “Pharaoh-Meant-King";
String sy = sw.substring(0, 5).toUpperCase();:
String sz = sw.substring(5).toLowerCase();
System.out.println(" SY = " + sy); System.out.println(" SZ = " + sz );
Very Short Answer
Advertisements

Solution

SY = PHARA

SZ = oh-meant-king

shaalaa.com
  Is there an error in this question or solution?
Chapter 10: String Handling - Exercises [Page 247]

APPEARS IN

Rupa Pandit Computer Applications [English] Class 10 ICSE
Chapter 10 String Handling
Exercises | Q 3. (i) | Page 247
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×