INFOVIEW QUESTION SET1
INFOVIEW QUESTION SET1
Java Questions
1.Which of the following features in not supported by Java?
a. Multithreading b. Reflection c. operator overloading d. Garbage Collection
2.Which class is the root(apex) call of all exception handling class hierarchy?
a. Throwable class b. Exception class c. Error class d. RuntimeException class
3.Java was influenced by and has features from many languages. which of the following did not influence
java(when it was created)?
a. C++ Language b. Objective C Language c. C# Language d. Smalltalk language
4.Which of the following two modifiers cannot be combined together for a class?
a. public and strictfp b. public and final c. abtract and strict fp d. final and abstract
5.Which of the following methods need to be overridden if equals method is overidden?
a. hashCode method b. toString method c. compareTo method d. equal method
6.Which of the following is a checked exception?
a. IndexoutofBoundException b. FileNotFoundException c. NegativeArrarySizeException d.
NullPointerException
7.Which of the following is the default access specifier for class member?
a. Public Access b. Private Access c. Protected Access d. Package Access
8.Which interface is not meant for serialization/peristence?
a. Externalizable b. Serializable c. Persistent d. None of the above
9.Which of the following is a 'marker interface'?
a. Comparable interface b. Enumerable interface c. Cloneble interface d. Runnable inerface
10.What is the range of 'byte' data type?
a. -128 to +127 b. -128 to +128 c. -255 to +255 d. -256 to +255
11.Which of the following is not a predefined stream in Sytem class?
a. System.in b. System.out c. Systemn.log d. System.err
12.Which of the following operator is short-circuit operator?
a. &(bitwise AND operator) b. &&(logical AND operatot) c. |(bitwise OR operator)
d. !(logical NOT operator)
13.Which of the following expression results in divide-by-zero exception(Arithmetic Exception)?
a. 10% 0 b. 1.0% 0.0 c. 10.0/0.0 d. 10/10-10
14.Which of following is the base class for unrecoverable exceptions and non programming errors that is
thrown by the java runtime?
a. Throwable b. Error c. Exception d. Runtime Exception
15.What does AWT Stand for?
a. Abstract Windowing Toolkit b. A web Toolkit c. Absoultely Wonderful Toolkit
d. Application With Type
16.Which of the following methods from Object is final(that is, cannot be overridden)?
a. Finalize method b. clone method c. hashCode method d. getClass method
17. Which access specifiers can be used with top level class ?
a. public or default b. public or private c. public or protected d. protected or default
18. Which of the following cannot be marked static ?
a. Constructors , Classes ( Outer ) , Classes ( nested ), Interfaces , Local variables , Inner Class methods and
instance variables.
b. Constructors , Classes ( Outer ) , Interfaces , Local variables , Class variables , Class Methods , Inner Class
methods and instance variables.
c. Constructors , Classes ( Outer ) , Interfaces , Local variables , Inner Class methods and instance
variables.
d. Constructors , Classes ( Outer ) , Classes (Nested), Interfaces , Local variables , Inner Class methods and
instance variables
19. Which is of the following is NOT TRUE for JVM ?
a. JVM reads Byte Code and generates Machine Code.
b. JVM is a virtual Machine that acts as a intermediary between Java Application and Host Operating System.
c. JVM reads Source Code and generates Byte Code.
d. JVM acts as a translator that translates different Machine code ( on the basis of Host Machine ) for a
common Byte Code.
20. Interface can only have ...
a. Member elements and Methods. b. Static Variables and Static Methods.
c. Static Final Variables and Instance Method Declarations.
d. Member Elements , Instance Methods, Static variables and Static Methods.