Which of these classes is not part of Java's Collection framework?
Which of the following method checks for equality of 2 strings?
Which method is used to determine the type of content in a URL?
Which of the following methods of the“ StringBuffer” class is used to find the length of a String?
<p>2</p>
<p>3</p>
<p>4</p>
<p>1</p>
<p>5</p>
function demo()
{
var element = document.getElementsByTagName("P").length;
alert(element);
}
What will be the output of the following Java program?
import java.net.*;
class Networking
{
public static void main(String[] args) throws MalformedURLException
{
URL obj = new URL("https://www.sanfoundry.com/javamcq");
System.out.print(obj.getPort());
}
}
Which of the following are advantages of packages?
What will be the output of the program?
class Equals
{
public static void main(String [] args)
{
int x = 100;
double y = 100.1;
boolean b = (x = y); /* Line 7 */
System.out.println(b);
}
}
Predict the output of the following Java code.
import java.util.*;
class Abekus {
public static void main(String args[]) {
Formatter F = new Formatter();
F.format("%,d", 345000);
System.out.println(F);
F.format("%,d", -230000);
System.out.println(F);
}
}
Predict the output of the following Java code:
import java.util.*;
public class Abekus {
public static void main(String[] args) {
PriorityQueue<Integer> pq = new PriorityQueue<>();
pq.add(36);
pq.add(11);
pq.add(82);
pq.add(50);
pq.add(62);
while (!pq.isEmpty())
System.out.printf("%d ", pq.remove());
}
}