1.
- 0
- 4
- 5
- 6
- an error occurs
Q1: What is the output of the following code?
String temp = "abcde";
System.out.println(temp.length());
String temp = "abcde";
System.out.println(temp.length());
String temp = "abcdefghijklmnopqrstuvwxyz";
System.out.println(temp.indexOf("fgk"));
String temp = "catcatcat";
System.out.println(temp.indexOf("cat"));
String temp = "abcdefghijklmnopqrstuvwxyz";
System.out.println(charAt.indexOf(3));
String temp = "onetwothreefour";
System.out.println(temp.substring(3,7));
String temp = "onetwothreefour";
System.out.println(temp.substring(6));