Java Objective Questions Answers -Chapter 1 Online Quiz Test
-
1. Package of drawstring() method is
- java.applet
- java.io
- javax.swing
- java.awt
-
2. Which method executes only once
- start() method
- init() method
- stop() method
- destroy() method
-
3. Object which can store group of other objects is called
- Collection object
- Java object
- Package
- Wrapper
-
4. All collection classes are available in
- java.io package
- java.lang package
- java.awt package
- java.util package
-
5. Thread class is available in
- java.io package
- java.lang package
- java.awt package
- java.util package
-
6. Minimum threads in a program are
- 1
- 2
- 5
- Many
-
7. JIT meaning
- java in time
- just in time
- join in time
- none of above
-
8. After the compilation of the java source code, which file is created by the JVM
- .class
- .java
- .cdr
- .doc
-
9. pow () is associated with which class
- Math class
- Input stream class
- Object class
- None of above
-
10. Constructor has return type
- True
- False
-
11. x=x+1 is equivalent to
- ++x
- x++
- x=x-1
- None of these
-
12. If method have same name as class name and method don’t have any return type then it is known as
- Destructors
- Object
- Variable
- Constructor
-
13. Methods that have same name, but different Parameter list and different definition known as
- Overriding
- Constructor
- Overloading
- none of these
-
14. Inheritance means
- Sub class extends super class
- Sub class extends Base class
- Sub class create object of super class
- All of the above
-
15. Which type of inheritance is not supported by java
- Single
- Multiple
- Mulilevel
- Hirarchical
-
16. String is the predefined
- Method
- Class
- Variable
- Object
-
17. Super is the predefined
- Keyword
- Method
- Keyword and Method
- None of above
-
18. Execution of the program is always begins with
- Main method
- class contain main method
- parent class
- default package
-
19. All methods of interface are public and abstract
- True
- False
-
20. In java, gc() method is available in which package
- java.lang package
- java.util package
- java.awt package
- java.io package