download Mastguru Android App

Java Objective Questions Answers -Chapter 1 Online Quiz Test

  • 1. Package of drawstring() method is

    1. java.applet
    2. java.io
    3. javax.swing
    4. java.awt
  • 2. Which method executes only once

    1. start() method
    2. init() method
    3. stop() method
    4. destroy() method
  • 3. Object which can store group of other objects is called

    1. Collection object
    2. Java object
    3. Package
    4. Wrapper
  • 4. All collection classes are available in

    1. java.io package
    2. java.lang package
    3. java.awt package
    4. java.util package
  • 5. Thread class is available in

    1. java.io package
    2. java.lang package
    3. java.awt package
    4. java.util package
  • 6. Minimum threads in a program are

    1. 1
    2. 2
    3. 5
    4. Many
  • 7. JIT meaning

    1. java in time
    2. just in time
    3. join in time
    4. none of above
  • 8. After the compilation of the java source code, which file is created by the JVM

    1. .class
    2. .java
    3. .cdr
    4. .doc
  • 9. pow () is associated with which class

    1. Math class
    2. Input stream class
    3. Object class
    4. None of above
  • 10. Constructor has return type

    1. True
    2. False
  • 11. x=x+1 is equivalent to

    1. ++x
    2. x++
    3. x=x-1
    4. 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

    1. Destructors
    2. Object
    3. Variable
    4. Constructor
  • 13. Methods that have same name, but different Parameter list and different definition known as

    1. Overriding
    2. Constructor
    3. Overloading
    4. none of these
  • 14. Inheritance means

    1. Sub class extends super class
    2. Sub class extends Base class
    3. Sub class create object of super class
    4. All of the above
  • 15. Which type of inheritance is not supported by java

    1. Single
    2. Multiple
    3. Mulilevel
    4. Hirarchical
  • 16. String is the predefined

    1. Method
    2. Class
    3. Variable
    4. Object
  • 17. Super is the predefined

    1. Keyword
    2. Method
    3. Keyword and Method
    4. None of above
  • 18. Execution of the program is always begins with

    1. Main method
    2. class contain main method
    3. parent class
    4. default package
  • 19. All methods of interface are public and abstract

    1. True
    2. False
  • 20. In java, gc() method is available in which package

    1. java.lang package
    2. java.util package
    3. java.awt package
    4. java.io package
Submit Quiz
Post a comment