What is the default maximum size of heap memory in the Java Virtual Machine?
Which of these methods can be used to make the main thread execute last among all the threads?
Select the correct option for the following Java code.
Which method can be used to obtain the command name for an ActionEvent object?
Which one is NOT true for process?
When we get this compilation error?
“Illegal modifier for the interface method Classname.methodName();”.
Predict the output of the following Java code.
class Abekus {
public static void main(String args[])
{
try {
return;
}
finally
{
System.out.println("Hello Abekus Team.");
}
}
}
Choose the correct option for this code.
class Abekus extends Thread {
public
void run()
{
System.out.println("Code run");
}
} class AbekusMain {
public
static void main(String[] args)
{
Abekus a = new Abekus();
a.run();
}
What will be the output of the following code?
class A
{
int rec (int n)
{
int count;
count = rec (n - 1);
return count;
}
}
class B
{
public static void main(String args[])
{
A obj = new A() ;
System.out.print(obj.rec(12));
}
}
import java.util.*;
class output
{
public static void main(String args[])
{
TreeSet obj = new TreeSet();
obj.add("5");
obj.add("2");
obj.add("3");
obj.add("1");
obj.add("9");
obj.add("3");
obj.add("2");
System.out.println(obj + " " + obj.size());
}
}