Ultimate Exam On Java: Quiz!

49 Questions | Total Attempts: 72

SettingsSettingsSettings
Ultimate Exam On Java: Quiz! - Quiz

.


Questions and Answers
  • 1. 
    What was the initial name of Java? 
    • A. 

      Panther

    • B. 

      Oak

    • C. 

      Coffee

    • D. 

      Oliver

  • 2. 
    Apart from James Gosling who are the other two behind developing Java? 
    • A. 

      Mike Sheridan & Guido van Rossum

    • B. 

      Patrick Naughton & Guido van Rossum

    • C. 

      Mike Sheridan & Patrick Naughton

    • D. 

      Guido van Rossum & James Strachan

  • 3. 
    What is the latest version of Java Released?
    • A. 

      Java 12

    • B. 

      Java 11

    • C. 

      Java 10

    • D. 

      Java 9

  • 4. 
    Which component is responsible to OPTIMIZE bytecode to machine code?
    • A. 

      JIT Compiler

    • B. 

      JVM

    • C. 

      Java Interpreter

    • D. 

      Operating Systems

  • 5. 
    In which version release of Java, Lambda expressions were introduced?
    • A. 

      Java 8

    • B. 

      Java 9

    • C. 

      Java 7

    • D. 

      Java 11

  • 6. 
    When does method overloading is determined?
    • A. 

      At RunTime

    • B. 

      At Compile Time

    • C. 

      At Coding Time

    • D. 

      None of the above

  • 7. 
    Which class is the superclass of every class in java?
    • A. 

      Object

    • B. 

      Class

    • C. 

      Super

    • D. 

      Parent

  • 8. 
    Which keyword cannot be used for a class which has been declared final?
    • A. 

      Abstract

    • B. 

      Implements

    • C. 

      Public

    • D. 

      Private

  • 9. 
    Which package contains of String and StringBuffer class?
    • A. 

      Java.util

    • B. 

      Java.net

    • C. 

      Java.lang

    • D. 

      Java.string

  • 10. 
    Which of these classes in Java is used to encapsulate IP address and DNS?
    • A. 

      DatagramPacket

    • B. 

      URL

    • C. 

      InetAddress

    • D. 

      ContentHandler

  • 11. 
    Which of these is a wrapper around everything associated with a reply from an HTTP server?
    • A. 

      HttpRequest

    • B. 

      HTTP

    • C. 

      HttpResponse

    • D. 

      Httpserver

  • 12. 
    Which of these data members of the HttpResponse class is used to store the response from an HTTP server?
    • A. 

      Statusrequest

    • B. 

      Address

    • C. 

      StatusResponse

    • D. 

      statusCode

  • 13. 
    Which of these classes is not part of Java’s collection framework?
    • A. 

      Map

    • B. 

      Array

    • C. 

      LinkedList

    • D. 

      Queue

  • 14. 
    Which of these class objects has an architecture similar to that of an array?
    • A. 

      Map

    • B. 

      Bitset

    • C. 

      Hashtable

    • D. 

      All of the mentioned

  • 15. 
    Which of these keywords is not a part of exception handling?
    • A. 

      Try

    • B. 

      Finally

    • C. 

      Thrown

    • D. 

      Catch

  • 16. 
    Which of the following is a super class of all exception type classes?
    • A. 

      String

    • B. 

      Catchable

    • C. 

      Throwable

    • D. 

      RuntimeExceptions

  • 17. 
    Thread priority in Java is?
    • A. 

      Integer

    • B. 

      Float

    • C. 

      Double

    • D. 

      Long

  • 18. 
    Which of these methods of Thread class is used to find out the priority given to a thread?
    • A. 

      get()

    • B. 

      ThreadPriority()

    • C. 

      GetPriority()

    • D. 

      GetThreadPriority()

  • 19. 
    Which of the following is an incorrect statement about interfaces?
    • A. 

      Interfaces specifies what class must do but not how it does

    • B. 

      Interfaces are specified public if they are to be accessed by any code in the program

    • C. 

      All variables in interface are implicitly final and static

    • D. 

      All variables are static and methods are public if interface is defined pubic

  • 20. 
    What is the default type of a variable in an interface?
    • A. 

      Public static

    • B. 

      Private final

    • C. 

      Public final

    • D. 

      Public static final

  • 21. 
    What will happen if we provide a concrete implementation of the method in the interface?
    • A. 

      The concrete class implementing that method need not provide implementation of that method

    • B. 

      Runtime exception is thrown

    • C. 

      Compilation failure

    • D. 

      Method not found exception is thrown

  • 22. 
    What is the substitute of the Rhino javascript engine in Java 8?
    • A. 

      Nashorn

    • B. 

      V8

    • C. 

      Inscript

    • D. 

      Narcissus

  • 23. 
    Which of the following code retrieves the body of the request as binary data?
    • A. 

      DataInputStream data = new InputStream()

    • B. 

      DataInputStream data = response.getInputStream()

    • C. 

      DataInputStream data = request.getInputStream()

    • D. 

       DataInputStream data = request.fetchInputStream()

  • 24. 
    Which of the following is the correct error when loading the JAR file with a duplicate name?
    • A. 

      Java.io.NullPointerException

    • B. 

      Java.lang.ClassNotFound

    • C. 

      Java.lang.ClassFormatError

    • D. 

      Java.lang.DuplicateClassError

  • 25. 
    How are java web applications packaged?
    • A. 

      Jar

    • B. 

      Both jar and war

    • C. 

      War

    • D. 

      Zip

Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.