Questions and CORRECT Answers
boolean - CORRECT ANSWER - Refers to an expression or variable that can have only a
true or false value.
Class - CORRECT ANSWER - A class definition defines instance and class variables and
methods, as well as specifying the interfaces the class implements and the immediate superclass
of the class. A class name always starts with a capital letter.
Comments - CORRECT ANSWER - Explanatory text that is ignored by the compiler. In
programs written in the Java programming language, comments are delimited using // or /* ...*/
Compiler - CORRECT ANSWER - A program to translate source code into code to be
executed by a computer. The Java compiler translates source code written in the Java
programming language into bytecode for the Java virtual machine.
Concatenation - CORRECT ANSWER - The actual meaning is 'to link together'.
Concatenating Strings means to join different Strings together to form a new String. Using an
empty String, denoted by "", will convert a number to a String so it can be displayed. The symbol
used to join Strings is the + sign.
Constructor - CORRECT ANSWER - A piece of code that creates an object. In the Java
programming language, constructors have the same name as their class and also start with a
capital letter. Constructors are invoked using the new keyword. There can be more than one
constructor to a class.
double - CORRECT ANSWER - a data type used to denote a number with a decimal place
e.g 2.15
field - CORRECT ANSWER - A data member of a class. Also known as an instance
variable. They are always declared private.