What are some uses for static functions

Keywords from Java

This is a complete list of all the keywords in Java. Some are cited multiple times if they are used in very different cases. Later extensions (assert, enum, static when importing) are marked with the version with which they were introduced.

Data types

boolean
Truth value. Either ... or .
byte
Whole numbers between and (8 bits).
short
Whole numbers between and (16 bits).
int
Whole numbers between and (32 bit).
long
Whole numbers between and (64 bit).
char
Individual characters of the Unicode character set between and (16 bit).
float
Floating point value according to IEEE 754 between approx. And (single precision, 32 bit).
double
Floating point value according to IEEE 754 between approx. And (double precision, 64 bit).
enum
Enumeration type. Contains any number of named integer constants and is similar to a class.
Attention: only available from JDK 1.5!

instructions

if
Conditional branching.
else
Alternative branch of a conditional branch. Belongs to .
switch
Choose from a list of alternatives.
case
Identification of a specific alternative. Belongs to .
default
Identification of the standard branch if no specific alternative fits. Belongs to .
while
Rejection loop. The condition is checked before each execution of the loop body.
do
Continuous loop. The condition is checked after each execution of the loop body.
for
Counting loop. Contains an initialization, a condition that is checked before each loop pass, and a part that is executed at the end of each pass.
throw
Throw an exception.
synchronized
Mark a block as synchronized. Before entering, the monitor of the specified object is requested.
try
Beginning of a block that ends with or both.
catch
Catches a certain exception and prevents further advancement in the stack.
finally
Is executed after the end of the block started with, however this block is exited.
assert
Checking of conditions with triggering of an error in the event of deviations. Mainly used for development. Can be turned off.
Attention: only available from JDK 1.4!

Abort instructions

These constructs should not be used. They are also completely redundant in proper code (an exception to this for break).

break
Jump to a label or immediately after the end of the innermost loop or statement. When using, this is needed to prevent "falling through" to the next alternative. All other uses must be strictly avoided!
continue
Jump forward to the end of the innermost loop or a marked loop. Any use must be strictly avoided!

Methods

return
Return from a method. Must specify the return value for functions.
throws
Declares all checked exceptions.
this
Specifies the current (innermost) object.
Super
To access elements of the parent class.
abstract
Indicates that the method in this class has no implementation. Subclasses have to overwrite this method with an implementation in order to be able to create objects from it. May only appear in abstract classes.
static
Identifies a method as a class method. Can be called independently of an object.
final
Indicates that this method may no longer be overwritten in subclasses.
strictfp
All float or double expressions within the method strictly comply with the IEEE 754 standard.
native
This method is not implemented in Java, but with platform-dependent code (in another programming language, usually C / C ++ / assembler).
synchronized
Marks the method as synchronized. Before entering, the monitor of the object or class is requested.
void
Special "data type" that specifies that the method has no return value (it is therefore a procedure and not a function).

Access control

public
The marked element (variable or method) is freely available to everyone.
protected
The marked element (variable or method) is available for subclasses and classes of the same.
private
The selected element (variable or method) is only available in this class.

Packages

package
The classes of this file belong to a certain package, which is specified by this. The directory structure must correspond exactly to the package hierarchy.
import
Imports packages or classes. These can then be used without specifying the package.
static
Static import of classes: Only static methods and constants can be imported in this way. These can then be used without specifying the class name.
Attention: only available from JDK 1.5!

Classes

class
Defines a new class.
extends
Specifies the parent class of a class. Multiple inheritance is not supported.
implements
Indicates the implemented interfaces (). In contrast to the parent class, this can be any number.
instanceof
Checks whether a given object is of a given class. If so, an assignment is possible.
interface
Defines a new interface ().
new
Creation of a new object of a certain class.
abstract
Indicates that no objects may be created from this class.
static
Only applies to inner classes: These are independent of an instance of the outer class.
final
No subclasses of this class may be defined.
strictfp
All float or double expressions within this class strictly conform to the IEEE 754 standard.

Variable identification

transient
This variable is not part of the persistent state of the object. In the case of serialization, it is ignored.
final
This variable can only have a single assignment, after which the value cannot be changed.
static
This is a class variable that is the same for all instances.
volatile
This variable can be changed by another thread. Special rules apply to the code generation of the interpreter.

Not currently used and reserved

const
For immutable elements (functions, variables, etc.). Comes from C and is used to deliver better error messages in the event of incorrect conversions.
goto
For absolute jumps to any (marked) code. Comes from C.

Last change: March 28, 2004
Michael V. Sunday