Java Fundamentals  «Prev  Next»

Java Programming Language - Quiz

Syntax of the Java Programming Language

Each question is worth one point. Select the best answer or answers for each question.
 

1. A core Java data type that is not derived from any other type and represents a single piece of information is called:
Please select the best answer.
  A. A complex data type
  B. A simple data type
  C. A composite data type

2. What is a special construct in Java that allows you to store a list of items of the same data type?
Please select the best answer.
  A. A string
  B. A literal
  C. An array

3. Java arrays are known as zero-based arrays because:
Please select the best answer.
  A. Their indexes always begin with zero.
  B. They always start out with zero elements
  C. They are always terminated with the number zero

4. What kind of operation does the modulus operator (%) perform?
Please select the best answer.
  A. It converts from decimal to percent
  B. It determines the remainder of a division
  C. It determines the average of two numbers



5. Determine the value of x after execution of the following statement:
int x = 24 / 8 + 7 * 7 - 5 + 4;
Please select the best answer.
  A. 69
  B. 51
  C. 43


Your score is 0.0