Lets Crack Online Exam

IT Interview Exam Questions: JAVA 5 (IT Campus Placement)

Subject: JAVA 5

Part 5: List for questions and answers of JAVA


Q1. Which interface provides the capability to store objects using a key-value pair?

a) Java.util.Map

b) Java.util.Collection

c) Java.util.Set

d) Java.util.Hashtable


Q2. Which collection class allows you to associate its elements with key values, and allows you to retrieve objects in FIFO (first-in, first-out) sequence?

a) java.util.ArrayList

b) java.util.LinkedHashMap

c) java.util.HashMap

d) None of these


Q3. Which collection class allows you to access its elements by associating a key with an element’s value, and provides synchronization?

a) java.util.SortedMap

b) java.util.Hashtable

c) java.util.TreeMap

d) None


Q4. What is the numerical range of char?

a) 0 to 65535

b) 0 to 32767

c) -256 to 255

d) none


Q5. Which is the valid declarations within an interface definition?

a) public double methoda();

b) public final double methoda();

c) static void methoda(double d1);

d) protected void methoda(double d1);


Q6. Which one of the following will declare an array and initialize it with five numbers?

a) Array a = new Array(5);

b) int [] a = {23,22,21,20,19};

c) int a [] = new int[5];

d) int [5] array; 


Q7. ORM is

a) Object relation mapping

b) object rotate mapping

c) object related mapping

d) none


Q8. java is

a) platform independent

b) platform dependent

c) robust

d) a and c


Q9. Tcp/Ip is

a) Two way communication

b) one way communication

c) Three way

d) None of these


Q10. how many way to communicate from applet to servlet

a) 1

b) 2

c) 3

d) 4


Q11. BDK stand for

a) Bean Development Kit

b) Byte Development Kit

c) Bold Development Kit

d) none


Q12. which container use flow layout as default layout

a) Applet

b) pannel

c) both

d) none


Q13. Which container use border layout

a) Fram

b) Dialog

c) window

d) ALL 


Q14. By which method You can set or change the text in a Label?

a) setText()

b) getText()

c) Both A and B

d) None of the above


Q15. Which class cannot be subclassed (or extended) in java?

a) abstract class

b) parent class

c) Final class

d) None of above


Q16. Why we use array as a parameter of main method

a) it is syntax

b) Can store multiple values

c) Both of above

d) None of above


Q17. Suspend thread can be revived by using

a) start() method

b) Suspend() method

c) resume() method

d) yield() method


Q18. Runnable is

a) Class

b) Method

c) Variable

d) Interface


Q19. Which of these operators can be used to concatenate two or more String objects?

a) +

b) +=

c) &

d) || 


Q20. Which collection class associates values witch keys, and orders the keys according to their natural order

a) java.util.HashSet

b) java.util.LinkedList

c) java.util.TreeMap

d) java.util.SortedSet 


Part 5: List for questions and answers of JAVA


Q1. Answer: a


Q2. Answer: b


Q3. Answer:


Q4. Answer: a


Q5. Answer: a


Q6. Answer: b


Q7. Answer: a


Q8. Answer: d


Q9. Answer: a


Q10. Answer: c


Q11. Answer: a


Q12. Answer: c


Q13. Answer: d


Q14. Answer: a


Q15. Answer: c


Q16. Answer: c


Q17. Answer: d


Q18. Answer: d


Q19. Answer: a


Q20. Answer: c