Home / Programming MCQs / JAVA MCQs / Question
K
Q. What is the output of the following code snippet?
String s1 = “Hello”; String s2 = sA)replace(‘l’, ‘z’); System.out.println(s2);
The replace method in Java returns a new string that is the original string with all occurrences of a specified character replaced by another character. In this case, sA)replace(‘l’, ‘z’) returns “Hezzo”.
You must be Logged in to update hint/solution
Which of these methods can be used to output a sting in an applet?
At any one instance of time _____ threads will be in running state.
Variable declared as _________ do not occupy memory on a per instance basis.
Java language supports ___ type of inheritance.
Which type of inheritance one super-class have more than one sub-class?
If we try to add Enum constants to a TreeSet, what sorting order will it use?
Discusssion
Login to discuss.