Java system properties are retrieved by System.getenv()
The class string belongs to which package
Which of the following right shift operators preserves the sign of the value?
In a class, encapsulating an object of another class is called
Another word for "repeating" a set of statements is:
class test{
public static void main (String[] args) {
byte b=120;
b+=8;
System.out.println(b);
}
}
Which of these methods are used to register a keyboard event listener?
Which of these statements about try-catch-finally blocks is incorrect?
What will be the output of the following Java program?
import java.io.*;
import java.net.*;
public class URLDemo
{
public static void main(String[] args)
{
try
{
URL url = new URL("https://abekus.co/java-mcq");
System.out.println("Protocol: " + url.getProtocol());
System.out.println("Host Name: " + url.getHost());
System.out.println("Port Number: " + url.getPort());
} catch (Exception e) { System.out.println(e); }
}
}