English

If String x = "Computer";String y = "Applications"; What do the following functions return? System.out. println(x.substring(1,5)); System.out.println(x.indexOf(x.charAt(4))); System.out.println(y - Computer Applications

Advertisements
Advertisements

Question

If String x = "Computer";
String y = "Applications";

What do the following functions return?

  1. System.out. println(x.substring(1,5));
  2. System.out.println(x.indexOf(x.charAt(4)));
  3. System.out.println(y + x.substring(5));
  4. System.out.println(x.equals(y)); 
Answer in Brief

Solution

  1. ompu
  2. 4
  3. Applicationster
  4. false
shaalaa.com
  Is there an error in this question or solution?
Chapter 4: String Handling - EXERCISES [Page 288]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 4 String Handling
EXERCISES | Q IV. 8. | Page 288
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×