Itemp Java Quiz 2

6 Questions | Total Attempts: 126

SettingsSettingsSettings
Please wait...
Java Quizzes & Trivia

Chapter 2 Revision


Questions and Answers
  • 1. 
    A Java source code can be created in  ______ .
    • A. 

      MS Paint

    • B. 

      NetBeans IDE

    • C. 

      Photoshop

    • D. 

      MS Excel

  • 2. 
    Which is the software you need to develop Java programs ?
    • A. 

      JDK (Java Development Kit)

    • B. 

      JRE (Java Runtime Environment)

    • C. 

      Java API

    • D. 

      JVM (Java Virtual Machine)

  • 3. 
    The _______ is used for compilation and the _______ is used for execution of the Java application.
    • A. 

      Java compiler, Java interpreter

    • B. 

      Java interpreter, Java executer

    • C. 

      Java compiler, Debugger

    • D. 

      Java compiler, Javadoc

  • 4. 
    Which of the following declarations of the main method in a Java application is correct?
    • A. 

      Public void main(String args)

    • B. 

      Public static void main(String[ ] args)

    • C. 

      Public static void main(string[ ] args)

    • D. 

      Public void main()

  • 5. 
    You are responsible for writing a new Java class, Employee, which will be used by several other classes in a large project. Select the correct way to declare the class, from the list below:
    • A. 

      New class Employee

    • B. 

      Protected class Employee

    • C. 

      Private class Employee

    • D. 

      Public class Employee

  • 6. 
    Which of the following is not a valid comment?
    • A. 

      /** comment */

    • B. 

      /* comment */

    • C. 

      /* comment

    • D. 

      // comment

Back to Top Back to top