This quiz comprises of very basic level of java concept questions. See how much you score out of 10.
Note : Answers to each question is given at the end.
1. What is base class for Exception?
Note : Answers to each question is given at the end.
1. What is base class for Exception?
- inner class
- Throwable
- Error
- run time exception
2. Which is related to garbage collection in java?
- Final
- Finally
- Finalize
- Try/Catch
3. String s = new String("Radar");
How many objects are created in this case?
- one
- two
- three
- four
4. ArrayList is a
- interface
- Object
- Class
- none
5. Which of the following is synchronized?
- Vector
- ArrayList
- HashSet
6. for(;;) will result in
- 1
- run time exception
- infinite loop
- compile time exception
7. A .class file in java consists of
- plain code
- class definition
- group of objects
- bytecode
8. Which one is a run time polymorphism?
- method overloading
- method overriding
- inheritence
- encapsulation
9. The wrapping up of data & function into a single unit(class) is called
- abstraction
- polymorphism
- serialization
- encapsulation
10. IOException is an example of:
- runtime exception
- compile time exception
- error
- none
Answers:
1-Throwable 2-Finalize 3-two 4-class 5-vector 6- infinite loop 7-bytecode
for(;;) is infinite loop and which might triggered to OutOfMemory Exception.
ReplyDeleteyou are correct
Delete