Java Interview Questions
Q76. ______ is a group of related data items that share a common name with same data type
(a) String
(b) Array
(c) Parameter
(d) Arguments
Answer: (b) Array
Q77. Which one of the following is false
(a) type arrayname[];
(b) arrayname [] type;
(c) type [] arrayname;
(d) None of the above
Answer: (b) arrayname [] type;
Q78. Which of the following is not a wrapper class
(a) Integer
(b) Byte
(c) Random
(d) Short
Answer: (a) Integer
Q79. Which of the following is false
(a) It is convenient to use vectors to store objects
(b) Vector can be used to store a list of objects that may vary in size
(c) Vector ia a StringBuffer
(d) We can add and delete objects from the list as and when required
Answer: (c) Vector ia a StringBuffer
Q80. We can use_________ to convert primitive data types to wrapper class types automatically
(a) Auto boxing
(b) Unboxing
(c) Annotations
(d) Both A and B
Answer: (d) Both A and B
Q81. ______________ method is used to convert primitive numbers to object numbers in wrapper classes
(a) String() Method
(b) Constructor Methods
(c) Parsing Method
(d) None of the above
Answer: (b) Constructor Methods
Q82. ________ gives the number of objects present
(a) list.size()
(b) list.copyInto(array)
(c) list.removeElement(item)
(d) Both A and B
Answer: (a) list.size()
Q83. Which are true
(a) An interface can sub interfaced from other interface
(b) Interface support extending
(c) Interface can’t support extending
(d) Both A and B
Answer: (d) Both A and B
Q84. _________ package is classes for networking
(a) java.io
(b) java.net
(c) java.awt
(d) java.applet
Answer: (b) java.net
Q85. Dead state can be compared with ______ method of applets
(a) stop()
(b) paint()
(c) destroy()
(d) init()
Answer: (c) destroy()
Q86. ________ method is used to find out that a thread is still running or no
(a) Alive()
(b) CheckRun()
(c) isAlive()
(d) Run()
Answer: (c) isAlive()
Q87. Default value of priority variable MIN_PRIORITY
(a) 1
(b) 10
(c) 100
(d) 1000
Answer: (a) 1
Q88. Default value of priority variable MAX_PRIORITY
(a) 5
(b) 10
(c) 50
(d) 100
Answer: (b) 10
Q89. Dividing an integer by zero is a ______error
(a) Compile
(b) Syntax
(c) Runtime
(d) Logic
Answer: (c) Runtime
Q90. An exception is a condition that is caused by a ________ error in the program
(a) Compile
(b) Execution
(c) Runtime
(d) Syntax
Answer: (c) Runtime
Practice Test Exam