Java Programming Basics - Quiz Explanation

The answers you selected are indicated below, along with text that explains the correct answers.
 
1. The smallest code element in a program which is meaningful to the compiler is called:
Please select the best answer.
  A. An identifier
  B. A token
  C. A literal
  The correct answer is B. The smallest code element in a program that is meaningful to the compiler is called a token. An identifier is a token that represents a name. A literal is a program data element that is constant.


2. What symbols are used to inform the Java compiler of how code elements are grouped?
Please select the best answer.
  A. Comments
  B. Operators
  C. Separators
  The correct answer is C. Separators are symbols used to inform the Java compiler of how code elements are grouped. Comments are used to document code for the purposes of the programmer. Operators are used to specify an evaluation or computation.


3. Which one of the following things is a Java token?
Please select the best answer.
  A. Comments
  B. Whitespace
  C. Keywords
  The correct answer is C. Keywords are Java tokens. Comments and whitespace are ignored by the Java compiler.