Are all methods in an interface required to be implemented?
Which of these is a protocol for breaking data into packets and sending them to an address across a network?
public class operators {
public static void main(String[] args)
{
int a = 20, b = 10, c = 0, d = 20, e = 40, f = 30;
System.out.println((a + b * d - e / f));
}
}
Which method of the wrapper class Integer is used to obtain the hash code for the invoking object?
Which of these methods returns the largest whole number less than or equal to a given variable X?
Which of the following is the correct error when loading a JAR file with a duplicate class name?
Which of the following is correct about 'public' method?
What is the output of the following Java code?
class bitwise_operator
{
public static void main(String args[])
{
int var1 = 42;
int var2 = ~var1;
System.out.print(var1 + " " + var2);
}
}
Predict the output of the following code:
import java.util.Scanner;
public class Main
{
public static void main(String args[])
{
String s1 = "super world";
System.out.println(s1.contains("super"));
System.out.println(s1.contains("TV"));
}
}
What will be the output of the following Java program?
import java.net.*;
class Networking
{
public static void main(String[] args) throws UnknownHostException
{
InetAddress obj1 = InetAddress.getByName("sanfoundry.com");
InetAddress obj2 = InetAddress.getByName("sanfoundry.com");
boolean x = obj1.equals(obj2);
System.out.print(x);
}
}