Computer Applications
Give the output of the following statements:
String x[] = {"SAMSUNG", "NOKIA", "SONY", "MICROMAX", "BLACKBERRY"};
System.out.println(x[1]);
Java
Java String Handling
ICSE 2017
22 Likes
Answer
NOKIA
Working
x[1]
gives the second element of the array x which is "NOKIA"
Answered By
12 Likes
Related Questions
Give the output of the following statements:
String x[] = {"SAMSUNG", "NOKIA", "SONY", "MICROMAX", "BLACKBERRY"};
System.out.println(x[3].length());
Give the output of the following:
String n = "Computer Knowledge"; String m = "Computer Applications"; System.out.println(n.substring(0,8).concat(m.substring(9))); System.out.println(n.endsWith("e"));
If:
String x = "Computer";
String y = "Applications";
What do the following function returns?
System.out.println(x.equals(y));Give the output of the following string functions:
"ACHIEVEMENT".replace('E', 'A')