Java uses threads to enable the entire environment to be ________.
Which keyword is used by a class to implement an interface defined previously?
class GFG {
public static void main (String[] args) {
String str=new String(100);
System.out.print(Integer.parseInt(str,8));
}
}
Predict the output of the following Java code.
Predict the output of the following Java code:
public class Abekus
{
static char ch = 97;
public static void main(String[] args)
{
System.out.println(ch + ch + " " + ch);
}
}
What will be the output of the following Java code?
class MultithreadedProgramming
{
public static void main(String[] args)
{
Thread t = Thread.currentThread();
System.out.println(t);
}
}
Statement 1- IOException is thrown by the remover() method
Statement 2- IllegalStateException is thrown by the remover() method
Statement 3- ObjectNotFoundExeception is thrown by the remover() method
Statement 4- SystemException is thrown by the remover() method
Predict the output of the following Java code:
import java.util.*;
import java.util.concurrent.LinkedBlockingQueue;
public class Abekus {
public static void main(String[] args)
throws IllegalStateException {
Queue<String> queue
= new LinkedBlockingQueue<String>(4);
queue.offer("h");
queue.offer("n");
queue.offer("o");
queue.offer("b");
System.out.println(queue);
}
}
import java.util.*;
class result
{
public static void main(String args[])
{
Hashtable obj = new Hashtable();
obj.put("A", new Integer(3));
obj.put("A", new Integer(3));
obj.put("B", new Integer(2));
obj.put("B", new Integer(2));
obj.put("C", new Integer(8));
obj.put("C", new Integer(8));
obj.put("D", new Integer(9));
obj.put("D", new Integer(9));
obj.put("E", new Integer(4));
obj.put("E", new Integer(4));
obj.put("F", new Integer(6));
obj.clear();
obj.put("F", new Integer(6));
System.out.print(obj.size());
}
}