Programming

Identifier An identifier is a name that identifies either a unique object or a unique class of objects, where the “object” or class may be an idea, physical [countable] object, or physical [noncountable] substance.

An identifier is a name you assign to a local variable, function parameter, function, function arguments, class, package/namespace, filename, etc.

The program code consists of statements that are made up of keywords, expressions, and operators.

The actions that a program takes are expressed in statements. 

Common actions include

  • Declaring variables // var firstOddNumber;
  • Assigning values // firstOddNumber = 1;
  • Declaration statements with initializers

equivalent to declaration statement followed by assignment statement:

  • const double pi = 3.14159; // Declare and initialize constant.
  • Calling methods
  • Looping through collections
  • Branching to one or another block of code, depending on a given condition. 
  • Expression statement (postfix increment). //counter++;

The order in which statements are executed in a program is called the flow of control or flow of execution. The flow of control may vary every time that a program is run, depending on how the program reacts to input that it receives at run time.

A statement can consist of a single line of code that ends in a semicolon, or a series of single-line statements in a block. A statement block is enclosed in {} brackets and can contain nested blocks.