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
Be the first to start discuss.
Q. What is the advantage of Method Overloading?
Q. The term _____________ refers to a class's direct ancestor or to any of its ascendant.~~~classes.
Q. ____ leaves a loop, ____ jumps to the next iteration
Q. Classes in the same package cannot access each other's package-access members.
Q. The most used interfaces from the collection framework are?
Discusssion
Login to discuss.