Treemap is a
Tree set and the map must be the comparable type
Range of 'byte' datatype is :
Which method is called first each time a servlet is called?
In Java, after executing the following code segment, what are the values of a, b, and c?
int a, b=12, c=20;
a = b++ + c++;
Statement 1-StringBuilder introduced in java 1.5
Statement 2-StringBuilder introduced in java 1.4
Statement 3-StringBuilder introduced in java 1.6
Statement 4-StringBuilder introduced in java 1.7
Predict the output of the following Java program.
class Test {
public static void main(String[] args) {
for(int i = 0; 0; i++)
{
System.out.println("Hello");
break;
}
}
}
//Predict the output
import java.util.Scanner;
public class Main
{
public static void main(String args[])
{
StringBuilder str = new StringBuilder("Greatlife");
int length = str.length();
System.out.println(" " + length);
}
}
Predict the output of the following Java code:
public class AbekusDatatype {
public static void main(String[] args) {
final long l1 = 13 * 245 * 189 * 5555 * 1234 * 10000;
final long l2 = 13 * 245 * 189 * 5555 * 1234;
System.out.println(l1 / l2);
}
}
Predict the output of the following Java code.
import java.util.*;
public class Abekus {
public static void main(String[] args) throws IllegalStateException {
Queue<String> queue = new LinkedList<String>();
queue.add("a");
queue.add("f");
queue.add("b");
queue.add("x");
System.out.println(queue);
}
}