Java Quiz interview questions

20 questions. Tap “Show answer” to check yourself.

Advertisement
  1. Which one of the following is not a wrap class?

    1. Short
    2. Double
    3. Byte
    4. Random
    Show answer

    D. Random

  2. POP is a/an

    1. Optional object programming
    2. Object optional programming
    3. Object oriented programming
    4. None of these
    Show answer

    C. Object oriented programming

  3. Which one of the following languages is pure object oriented language?

    1. Java
    2. C
    3. C++
    4. Object pascal
    Show answer

    A. Java

  4. Which one of the following is not a java keyword?

    1. static
    2. break
    3. study
    4. class
    Show answer

    C. study

  5. By invoking repaint ( ) for a component, the AWT invokes the method

    1. Update ( )
    2. Show ( )
    3. Paint ( )
    4. Draw ( )
    Show answer

    A. Update ( )

  6. The default priority is

    1. 1
    2. 2
    3. 4
    4. 5
    Show answer

    D. 5

  7. When the thread is ready for execution and waiting for the availability of the processor, it is said to be

    1. dead state
    2. running state
    3. in runable state
    4. blocked state
    Show answer

    C. in runable state

  8. Java declaration statement must end with

    1. a semicolon
    2. full stop
    3. comma
    4. a colon
    Show answer

    A. a semicolon

  9. Java

    1. is most suitable for Internet programming
    2. non an acronym
    3. a really simple, reliable, portable and powerful language
    4. all of these
    Show answer

    D. all of these

  10. Which one of the following is a logical operator?

    1. ||
    2. &&
    3. !
    4. all of these
    Show answer

    D. all of these

  11. The method which belongs to the string class is/are

    1. Compare to ( )
    2. Length ( )
    3. Substring ( )
    4. Equals ( )
    Show answer

    B. Length ( )

  12. For a 32-bit integer value, keyword used is

    1. Boolean
    2. Int
    3. Short
    4. Long
    Show answer

    B. Int

  13. Advertisement
  14. A web page is

    1. Made up of text and HTML tags
    2. Marked by an opening HTML tag
    3. Marked by a closing HTML tag
    4. All of these
    Show answer

    D. All of these

  15. Java is a general purpose object oriented programming language developed by

    1. Patrick Naughton
    2. Infosys
    3. I.B.M.
    4. Microsystems of USA
    Show answer

    D. Microsystems of USA

  16. Which one of the following web browsers uses Just-In-Time (JIT) complier?

    1. Hot JAVA
    2. Netscape navigator
    3. Internet Explorer
    4. None of these
  17. ?: is: a/an

    1. Assignment operator
    2. Conditional operator
    3. Logical AND
    4. Inequality
    Show answer

    B. Conditional operator

  18. Which one of the following is a java keyword?

    1. Public
    2. Void
    3. While
    4. Switch
    Show answer

    A. Public

  19. Which one of the following concept is incorporated in building a java program?

    1. Polymorphism
    2. Inheritance
    3. Encapsulation
    4. All of these
    Show answer

    D. All of these

  20. Object oriented programming language, is

    1. C++
    2. Java
    3. Both (a) and (b)
    4. None of these
    Show answer

    C. Both (a) and (b)

  21. The methods wait ( ) and notify ( ) are defined in

    1. java.lang.object
    2. java.lang.thread
    3. java.lang.string
    4. java.lang.threadgroup
    Show answer

    A. java.lang.object

Advertisement