K
Q. What is the output of the following code snippet?
String s1 = “Hello”; System.out.println(sA)substring(1));
The substring method in Java returns a new string that is a substring of the original string, starting from a specified index. If no end index is specified, the substring extends to the end of the original string. In this case, sA)substring(1) returns “ello”.
You must be Logged in to update hint/solution
Be the first to start discuss.
Q. Which of these is an instance variable of class httpd?
Q. What is an interface in Java?
Q. What is used to get class name in reflection?
Q. What can be accessed or inherited without actual copy of code to each program?
Q. What does this code display?
Q. The method setFont() is defined in---------- class
Discusssion
Login to discuss.