Home / Programming MCQs / JAVA MCQs / Question
K
Q. What is the output of the following code snippet?
String s1 = “Hello”; System.out.println(sA)indexOf(‘z’));
If the specified character is not found in the string, the indexOf method returns -A) In this case, sA)indexOf(‘z’) returns -1 because the character “z” is not in the string.
You must be Logged in to update hint/solution
Choose the correct syntax of the WHILE loop in Java below.
Which of these method is used to find a URL from the cache of httpd?
Which of those allows duplicate elements?
What is the output of this program?
When a class is declared as final , then ____.
_____ is used to manage the memory allocation.
What is the output of the below Java program with FOR loop?
The ________ method help in clearing the contents of the buffer:
Discusssion
Login to discuss.