Java vocabulary
import
A Java keyword used at the beginning of a source file that can specify classes or entire packages to be referred to later without including their package names in the reference.
public
A Java keyword used in a method or variable declaration. It signifies that the method or variable can be accessed by elements residing in other classes.
private
A Java keyword used in a method or variable declaration. It signifies that the method or variable can only be accessed by other elements of its class.
void
A Java keyword used in method declarations to specify that the method does not return any value.
if
A Java keyword used to conduct a conditional test and execute a block of statements if the test evaluates to true.
new
A Java keyword used to create an instance of a class.
int
A Java keyword used to define a variable of type integer.
return
A Java keyword used to finish the execution of a method. It can be followed by a value of the type required by the method definition.
Class
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.
field
A data member of a class. Also known as an instance variable. They are always declared private.
method
A function defined in a class.
Constructor
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.
Compiler
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.
primitive type
A variable data type in which the variable's value is of the appropriate size and format for its type: a number, a character, or a boolean value.
instance
An object of a particular class. In programs written in the Java programming language, an instance of a class is created using the new operator followed by the class name.
instance variable
Any item of data that is associated with a particular object. Each instance of a class has its own copy of the instance variables defined in the class. Also called a field.
Comments
Explanatory text that is ignored by the compiler. In programs written in the Java programming language, comments are delimited using // or /* ...*/
boolean
Refers to an expression or variable that can have only a true or false value.
Keyword
Java sets aside words as keywords - these words are reserved by the language itself and therefore are not available as names for variables or methods. They all start with a lower case letter.
parameter
Parameters are the variables that are listed as part of a method declaration. Each parameter must have a unique name and a defined data type.
Concatenation
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.
Object
The principal building blocks of object-oriented programs. Each object is a programming unit consisting of data (instance variables) and functionality (instance methods).
double
a data type used to denote a number with a decimal place e.g 2.15