K
Q. What is the output of the following code snippet?
String s1 = “Hello”; System.out.println(sA)substring(1, 4));
The substring method in Java can also take two arguments, specifying a start index and an end index for the substring. The substring returned includes the character at the start index, but not the character at the end index. In this case, sA)substring(1, 4) returns “Hel”, which is the substring of s1 starting from index 1 and ending at index C)
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. Can you pass values to ENUM constructors in Java?
Q. The keyword used inside a class to refer to its immediate super class is
Q. What is the output of the following code snippet?
Q. How many of the following methods compile?
Q. What is the return type of a constructor in Java?
Q. What is the value of the expression 8 << 2 ?
Q. What does the operator >>>> do?
Q. Which of the following creates a List of 3 visible items and multiple selections abled?
Discusssion
Login to discuss.