Question 1 of 25
Hints left: 3
Q1
What will be the output of the following Java code? import java.util.*; class hashtable { public static void main(String args[]) { Hashtable obj = new Hashtable(); obj.put("A", new Integer(3)); obj.put("B", new Integer(2)); obj.put("C", new Integer(8)); System.out.print(obj.contains(new Integer(5))); } }
Q2
What will be the output of the following Java program? import java.util.*; class Maps { public static void main(String args[]) { TreeMap obj = new TreeMap(); obj.put("A", new Integer(1)); obj.put("B", new Integer(2)); obj.put("C", new Integer(3)); System.out.println(obj.entrySet()); } }
Q3
Which of the below is not an implementation of List interface?
Q4
Which of these is the interface of legacy?
Q5
When an array is passed to a method, will the content of the array undergo changes with the actions carried within the function?
Q6
Which of these is a method of ListIterator used to obtain index of previous element?
Q7
Which of these class object has an architecture similar to that of array?
Q8
Which of these standard collection classes implements all the standard functions on list data structure?
Q9
Which of these package is used for all the text related modifications?
Q10
Which class provides thread safe implementation of List?
Q11
What is the length of the application box made in the following Java program? import java.awt.*; import java.applet.*; public class myapplet extends Applet { Graphic g; g.drawString("A Simple Applet",20,20); }
Q12
Which of these method is used to calculate number of bits required to hold the BitSet object?
Q13
What will be the output of the following Java code snippet? public class Test { public static void main(String[] args) { Set s = new HashSet(); s.add(new Long(10)); s.add(new Integer(10)); for(Object object : s) { System.out.println("test - "+object); } } }
Q14
While finding the correct location for saving key value pair, how many times the key is hashed?
Q15
Where does a new element be inserted in linked list implementation of a queue?
Q16
What is the correct method used to insert and delete items from the queue?
Q17
Which of these standard collection classes implements a dynamic array?
Q18
What is the worst case complexity of accessing an element in ArrayList?
Q19
If large number of items are stored in hash bucket, what happens to the internal structure?
Q20
What happens if two threads simultaneously modify TreeSet?
Q21
Which of these Exceptions is thrown by remote method?
Q22
What is the default clone of HashSet?
Q23
What will be the output of the following Java program? import java.util.*; class Arraylist { public static void main(String args[]) { ArrayList obj = new ArrayList(); obj.add("A"); obj.add("B"); obj.add("C"); obj.add(1, "D"); System.out.println(obj); } }
-
A
-
B
-
C
-
D
Q24
What is the remaining capacity of BlockingQueue whose intrinsic capacity is not defined?
Q25
Which of these is a Basic interface that all other interface inherits?