The default capacity of a vector is ___.
Garbage collector is one of the good example for daemon threads.
Which of the following annotations is not used in Hibernate?
Which gives better performance for inserting and deleting in the middle of the list?
What is the value returned by function compareTo() if the invoking string is less than the string compared
How can we ensure that a resource is not used by multiple threads simultaneously?
What will be the output of the following Java code?
public class A {
public static void main(String[] args) {
System.out.println('j' + 'a' + 'v' + 'a');
}
}
What is the output of the following Java code?
class Abekus
{
public static void main(String[] args)
{
try
{
System.out.println(5/0);
}
catch(ArithmeticException e)
{
System.out.println("Hello");
}
catch(Exception e)
{
System.out.println("Abekus");
}
}
}
What is the output of the following Java code?
class Abekus {
public static void main(String args[]) {
int arr[] = new int[3];
for (int i = 0; i < 3; i++) {
arr[i] = i;
}
int Best = arr[0] + arr[1];
String Sentence1 = "Make your rank ";
String Sentence2 = " on Abekus";
System.out.println(Sentence1 + Best + Sentence2);
}
}
class method
{
static int i;
static int j;
void add(int a , int b)
{
i =a + b;
j =i + b;
}
}
class output
{
public static void main(String args[])
{
method obj1 = new method();
method obj2 = new method();
int a = 5;
obj1.add(a, a+1);
obj2.add(6, a);
System.out.println(obj1.i+" "+obj2.j);
}
}