IVTL ( Infoview Java questions
1.It is not recommended to invoke a ________of the same class from the constructor.
a. Static method b. final method c. overridable method d. synchronized method
2.Which of the following features in not supported by Java?
a. Multithreading b. Reflection c. operator overloading d. Garbage Collection
3.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
4.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
5.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
6.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
7.Which of the following is a checked exception?
a. IndexoutofBoundException b. FileNotFoundException c. NegativeArrarySizeException d. NullPointerException
8.Which of the following is the default access specifier for class member?
a. Public Access b. Private Access c. Protected Access d. Package Access
9.Which interface is not meant for serialization/peristence?
a. Externalizable b. Serializable c. Persistent d. None of the above
10.Which of the following is a ‘marker interface’?
a. Comparable interface b. Enumerable interface c. Cloneble interface d. Runnable inerface
11.Which of the following statement is wrong?
a. An overridden method can declare to throw more checked exceptions than the base class method.
b. An overridden method can declare to throw less checked exceptions than the base class method.
c. An overridden method can declare to throw no exceptions compared to the base class method.
d. An overridden method can declare to throw less runtime exceptions than the base class method.
12.What is the range of ‘byte’ data type?
a. -128 to +127 b. -128 to +128 c. -255 to +255 d. -256 to +255
13.Which of following statment is true about assertion?
a. Assertion can be used to check if the passed argument in public method is valid or not.
b. It is recommended to have side-effect operation in assert condition.
c. Assertion are disabled during development but enabled during deployment
d. Assertion give us a way to test our assumptions during development and debugging.
14.Which of the following is not a predefined stream in Sytem class?
a. System.in b. System.out c. Systemn.log d. System.err
15.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)
16.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
17.Which of the following is false about interfaces?
a. Inteface methods cannot be marked as final, native, strictfp, or synchronized.
b. An interface can extend one or more intefaces.
c. An inteface can implement another interface or a class
d. All Variable declared in interface are public, static and final
18.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
19.What does AWT Stand for?
a. Abstract Windowing Toolkit b. A web Toolkit c. Absoultely Wonderful Toolkit d. Application With Type
20.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
Comment below for answers…..