Computer Applications
If:
String x = "Computer";
String y = "Applications";
What do the following function returns?
System.out.println(x.equals(y));
Java
Java String Handling
ICSE 2008
42 Likes
Answer
false
Working
As strings x
and y
are not equal so x.equals(y)
returns false.
Answered By
24 Likes
Related Questions
If:
String x = "Computer";
String y = "Applications";
What do the following function returns?
System.out.println(x.indexOf(x.charAt(4)));Give the output of the following statements:
String x[] = {"SAMSUNG", "NOKIA", "SONY", "MICROMAX", "BLACKBERRY"};
System.out.println(x[1]);
If:
String x = "Computer";
String y = "Applications";
What do the following function returns?
System.out.println(y + x.substring(5));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"));