20 Java multiple choice questions

20 Java multiple choice questions

SHARE

These are some random Java questions that are very basic, and every java programmer should know. See how confident you are in answering these questions.

  1. The most basic circuitry-level computer language, which consists of on and off switches, is ________
    1. a high-level language
    2. machine language
    3. the Java programming language
    4. C++
  2. Languages that let you use a vocabulary of descriptive terms like “read,” “write,” or “add” are known as ________ languages.
    1. high-level
    2. machine
    3. procedural
    4. object-oriented
  3. The rules of a programming language constitute its ________
    1. objects
    2. logic
    3. format
    4. syntax
  4. A ________ translates high-level language statements into machine code.
    1. programmer
    2. syntax detector
    3. compiler
    4. decipherer
  5. Programmer-named computer memory locations are called __________
    1. compilers
    2. variables
    3. addresses
    4. appellations
  6. For convenience, the individual operations used in a computer program often are grouped into logical units called __________
    1. procedures
    2. variables
    3. constants
    4. logistics
  7. Envisioning program components as objects that are similar to concrete objects in the real world is the hallmark of __________
    1. command-line operating systems
    2. procedural programming
    3. object-oriented programming
    4. machine languages
  8. An object’s attributes also are known as its ____________
    1. states
    2. orientations
    3. methods
    4. procedures
  9. An instance of a(n) ____________ inherits its attributes from it.
    1.  object
    2. procedure
    3. method
    4. class
  10. The Java programming language is architecturally ___________
    1. specific
    2. oriented
    3. neutral
    4. abstract
  11. You must compile programs written in the Java programming language into _________
    1. bytecode
    2. source code
    3. javadoc statements
    4. object code
  12. All Java programming language statements must end with a _______
    1. period
    2. comma
    3. semicolon
    4. closing parenthesis
  13. Arguments to methods always appear within __________
    1. parentheses
    2. double quotation marks
    3. single quotation marks
    4. curly brackets
  14. In Java program, you must use _____________ to separate classes, objects, and methods.
    1. commas
    2. semicolons
    3. periods
    4. forward slashes
  15. All Java programs must have a method named _____________
    1. method()
    2. main()
    3. java()
    4. Hello()
  16. The Java programming language supports three types of comments: ________, __________, and javadoc.
    1. line, block
    2. string, literal
    3. constant, variable
    4. singles, multiple
  17. Non-executing program statements that provide documentation are called ___________
    1. classes
    2. notes
    3. comments
    4. commands
  18. After you write and save a program file, you _________ it.
    1. interpret and then compile
    2. interpret and the execute
    3. compile and then re-save
    4. compile and then interpret
  19. The command to execute a compiled program is _________
    1. run
    2. execute
    3. javac
    4. java
  20. Your save text files containing Java language source code using the file extension
    1. .java
    2. .class
    3. .txt
    4. .src

SHARE
Programmer, Database Designer and Administrator for Web Application. Who loves to read and write interesting topics.

LEAVE A REPLY