Programming In Java (1)

20 Questions | Total Attempts: 570

SettingsSettingsSettings
Please wait...
Java Programming Quizzes & Trivia

Questions and Answers
  • 1. 
    API stands for:
    • A. 

      Application program interface

    • B. 

      Application programming interface

    • C. 

      Applications in Program interchange

  • 2. 
    JVM stands for:
    • A. 

      Java Virtual Machine

    • B. 

      Java Virtual marking

    • C. 

      Java Virus Mapping

  • 3. 
    The file containing Java programming statements is also known as:
    • A. 

      Byte code

    • B. 

      Source code

    • C. 

      .java file

    • D. 

      Input file

  • 4. 
    The Java machine-independent code is called:
    • A. 

      Source code

    • B. 

      .java file

    • C. 

      Byte code

    • D. 

      Output file

  • 5. 
    The three main types of programs that you can write using Java are:
    • A. 

      Applications

    • B. 

      Source files

    • C. 

      Applets

    • D. 

      Servlets

    • E. 

      Classes

  • 6. 
    Java applications can be further subdivided into 2 of the following applications:
    • A. 

      Applets applications

    • B. 

      Console applications

    • C. 

      Project applications

    • D. 

      Windowed applications

  • 7. 
    Java programming language is modeled after which language?
    • A. 

      C#

    • B. 

      C

    • C. 

      C++

    • D. 

      Python

  • 8. 
    Which of the following Java statements is the correct way to display "Hello World" on the screen?
    • A. 

      System.out.println("Hello World");

    • B. 

      System.out.println("Hello World")

    • C. 

      System.out.println("Hello World");

    • D. 

      System.out.printin("Hello World");

    • E. 

      System.out.println("Hello World")

  • 9. 
    Every statement in Java must be terminated by:
    • A. 

      A full stop

    • B. 

      A semicolon

    • C. 

      Nothing

    • D. 

      A bracket

    • E. 

      A colon

  • 10. 
    Java is case-sensitive
    • A. 

      True

    • B. 

      False

  • 11. 
    All Java applications must have a main() method
    • A. 

      True

    • B. 

      False

  • 12. 
    Program comments are non-executing statements.
    • A. 

      True

    • B. 

      False

  • 13. 
    An error that occurs when you introduce typing errors into your program is known as :
    • A. 

      Logical error

    • B. 

      Syntax error

    • C. 

      Red-line error

    • D. 

      Type mismatch

  • 14. 
    Java source files are saved with the extension:
    • A. 

      .doc

    • B. 

      .javadoc

    • C. 

      .java

    • D. 

      .class

  • 15. 
    Which of the following arithmetic operators will give you the remainder after dividing?
    • A. 

      +

    • B. 

      /

    • C. 

      *

    • D. 

      %

  • 16. 
    The variable data type that can hold only two values, true or false is:
    • A. 

      Int

    • B. 

      Float

    • C. 

      Double

    • D. 

      Boolean

  • 17. 
    Which of the following are Java reserved words?
    • A. 

      Integer

    • B. 

      Public

    • C. 

      Bool

    • D. 

      Age

    • E. 

      Divide

    • F. 

      Variable

    • G. 

      Double

    • H. 

      Do

  • 18. 
    Which data type can I use to store the first letter of my surname?
    • A. 

      Boolean

    • B. 

      Char

    • C. 

      String

    • D. 

      Byte

  • 19. 
    Which data type can I use to store my surname?
    • A. 

      Boolean

    • B. 

      Char

    • C. 

      String

    • D. 

      Byte

  • 20. 
    Which data type can I use to store my salary in Java?
    • A. 

      Int

    • B. 

      Long

    • C. 

      Double

    • D. 

      Real

Back to Top Back to top