Header Ads

ad728
  • Latest

    Java MCQs ( Multiple Choice Questions ) with Answers - Set I


    Top Post Ad

     Java MCQ's  with Answers

    set I


    Q1. Java has its origin in

    a) C programming language

    b) PERRL

    c) COBOL

    d) Oak programming language

    Answer is d) Oak programming language
    Explanation :
    For explanation Join the discussion below

     

    Q2. Java programs are

    a) Faster than others

    b) Platform independent

    c) Not reusable

    d) Not scalable

    Answer is b) Platform independent
    Explanation :
    For explanation Join the discussion below

     

    Q3. Which one of the following is true for Java

    a) Java is object-oriented and interpreted

    b) Java is efficient and faster than C

    c) Java is the choice of everyone.

    d) Java is not robust.

     

    Q4. Java servlets are an efficient and powerful solution for creating _________ for the web.

    a) Dynamic content

    b) Static content

    c) Hardware

    d) Both a and b

     

    Q5. The command javac is used to

    a) debug a java program

    b) compile a java program

    c) interpret a java program

    d) execute a java program

     

    Q6. Which of the following is not a Java features?

    a) Dynamic

    b) Architecture Neutral

    c) Object-oriented

    d) Use of pointers

     

    Q7. Which of the following option leads to the portability and security of Java?

    a) Bytecode is executed by JVM

    b) The applet makes the Java code secure and portable

    c) Use of exception handling

    d) Dynamic binding between objects

     

    Q8. Native-protocol pure Java converts _________ into the _________ used by DBMSs directly.

    a) JDBC calls, network protocol

    b) ODBC class, network protocol

    c) ODBC class, user call

    d) JDBC calls, user call

     

    Q9. Which is the root class of all AWT events

    a) java.awt.ActionEvent

    b) java.awt.AWTEvent

    c) java.awt.event.AWTEvent

    d) java.awt.event.Event

     

    Q10. OOP features are
    i) Increasing productivity ii) Reusability
    iii) Decreasing maintenance cost iv) High vulnerability

    a) i,ii & iv

    b) i,ii & iii

    c) i, ii & iv

    d) none of the above

     

    Q11. _________ is used to find and fix bugs in the Java programs.

    a) JVM

    b) JDK

    c) JDB

    d) JRE

     

    Q12. Filters were officially introduced in the Servlet _________ specification.

    a) 2.1

    b) 2.3

    c) 2.2

    d) 2.4

     

    Q13. break statement is used to
    i) get out of method ii) end a program
    iii) get out of a loop iv) get out of the system

    a) i & ii

    b) i,ii & iv

    c) i & iii

    d) iii

     

    Q14. Evaluate the following Java expression, if x=3, y=5, and z=10:
    ++z + y - y + z + x++

    a) 24

    b) 25

    c) 20

    d) 23

     

    Q15. Which package contains the Random class?

    a) java.util package

    b) java.lang package

    c) java.awt package

    d) java.io package

     




    No comments

    Post Top Ad

    ad728

    Post Bottom Ad

    ad728