A1 Java Keyword Reference

Keyword Description
abstract Used to modify a class or a method.
boolean It is a Java primitive type. A boolean variable may take on one of the values true or false.
break Used to prematurely exit a loop or to mark the end of a case block in a switch statement.
byte It is a Java primitive type. A byte can store an integer value in the range [128, 127].
case Used to label each branch in a switch statement.
catch Used to define exception handling blocks in try? catch? finally statements.
char It is a Java primitive type. It can store unsigned single unicode character.
class Used to declare a new Java class, which is a collection of related variables and/or methods.
continue Used to the next iteration of a for, while, or do loop.
default Used to label the default branch in a switch statement.
do Specifies a loop whose condition is checked at the end of each iteration.
double It is a Java primitive type. A double variable may store a double precision floating point value. Since floating point data types are approximations of real numbers, you should generally never compare floating point numbers for quality.
else Used in association with the if keyword in an if-else statement.
extends Used in a class or interface declaration to indicate that the class or interface being declared is a subclass of the class or interface whose name follows the 'extends' keyword.
false Represents one of the two legal values for a boolean variable.
final May be applied to a class, indicating the class may not be extended (subclassed).
finally Used to define a block that is always executed in a try? catch? finally statement.
float It is a Java primitive type. To specify a single? Perception literal value, follow the number with f or F, as in 0.01f.
for Specifies a loop whose condition is checked before each iteration.
if Indicates conditional execution of a block.
implements Used in a class declaration to indicate that the class declared provides implementations for all methods declared in the interface whose name follows the implements keyword.
import Makes one class or all classes in a package visible in the current Java source file.
instanceof Used to determine the class of an object.
int It is a Java primitive type. An int variable may store a 32-bit integer value. The integer class is a wrapper class for the int primitive type.
interface Used to declare a new Java interface, which is a collection of methods.
long It is a Java primitive type. A long variable may store a 64-bit signed integer.
Native May be applied to a method to indicate that the method is implemented in a language other than Java.
new Used to create a new instance of a class.
null It is a Java reserved word representing no value.
package Specifies the Java package in which the classes declared in a Java source file reside.
private It is an access control modifier that may be applied to a class, a method or a field (a variable declared in a class). It specifies that the member can only be accessed in its own class.
protected It is an access control modifier that may be applied to a class, a method or a field (a variable declared in a class). It specifies that member can only be accessed within its own package, and in addition, by a subclass of its class in another package.
public It is an access control modifier that may be applied to a class, a method or a field (a variable declared in a class).
return Used to cause a method to return to the method that called it, passing a value that matches the return type of the returning method.
short It is a Java primitive type. A short variable may store a 16-bit signed integer.
static May be applied to an inner class (a class defined within another class), method or field (a member variable of a class).
super Refers to the superclass of the class in which the keyword is used. super as a stand-alone statement represents a call to a constructor of the superclass. super.<methodName>() represents a call to a method of the superclass.
switch Used to select execution of one of multiple code blocks based on an expression.
synchronized May be applied to a method or statement block and provides protection for critical sections that should only be executed by one thread at a time.
this Refers to the current instance. The 'this' keyword is used to refer to the current instance when a reference may be ambiguous.
throw Used to raise an exception. Any method that throws an exception that is not a RuntimeException must also declare the exceptions it throws using a throws modifier on the method declaration.
throws May be applied to a method to indicate the method raises particular types of exceptions.
transient May be applied to member variables of a class to indicate that the member variable should not be serialized when the containing class instance is serialized.
try Used to enclose blocks of statements that might throw exceptions.
true Represents one of the two legal values for a boolean variable.
void Represents a null type. It may be used as the return type of a method to indicate the method does not return a value.
volatile Used to indicate a member variable that may be modified asynchronously by more than one thread.
while Specifies a loop that is repeated as long as a condition is true.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.126.211