English

What do the following functions return? String x = "Vision";String y = "2020"; System.out.println(x + y); System.out.printh1(x.length ()); System.out.println(x.charAt(3)); System.out.println(x.equals - Computer Applications

Advertisements
Advertisements

Question

What do the following functions return? 

String x = "Vision";
String y = "2020";

  1. System.out.println(x + y);
  2. System.out.printh1(x.length ());
  3. System.out.println(x.charAt(3));
  4. System.out.println(x.equals(y)); 
Answer in Brief

Solution

  1. Vision2020
  2. 6
  3. i
  4. false
shaalaa.com
  Is there an error in this question or solution?
Chapter 4: String Handling - EXERCISES [Page 287]

APPEARS IN

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

Englishहिंदीमराठी


      Forgot password?
Use app×