Java – Definitions

Arguments: Zero or more pieces of information placed inside parentheses

  • System.out.println(“This is an argument”);

Class: name for a type whose values are objects

Identifier: The name of a variable or other item (class, method, object, etc.) defined in a program

  • Cannot start with a digit.  All characters must be letters, digits, or the underscore
  • Can be any length
  • Case sensitive

Keywords & Reserved Words: Identifiers that have a pre-defined meaning in Java (public, class, void, static)


  • A method is a named sequence of statements that can be invoked. The method definintion consists of a method header and method body. Invoking a method involves sending a message to an object containing that method.
    • (Examples: main(); compareTo())
  • Actions performed by an object
    • (println: the mothod or action that the System.out object performs)
  • All objects within a class have the same methods, but each can have different data values

Objects: entities that store data and perform actions

  • System.out: an object for sending output to the screen

Semantics: The meaning of things written while following the syntax rules of a language


Syntax:The arrangement of words and punctuations that are legal in a language, the grammar rules of a language

Syntax Error: A grammatical mistake in a program


Statement: The execution of a program is controlled by its statements. Unlike expressions, whose primary purpose is to be evaluated for their value, statements are executed for their effect– they have no value. For example, a declaration statement introduces one or more variables that may then be used in the program.

  • (Examples:

Variable Declaration: Give type of variable followed by semicolon

  • int answer;