Java Keywords

JAVA Keywords
=============

Keywords in Java are words  or expressions used to declare an expression, method or return value.
About the number of those keywords some say that there are 48, some 50, some others 52.
Here we have 51;There are:

byte, boolean, break, case, char, continue, float, for, if, else, import, int,interface, long, new, package, private, protected, public, return, short, this, void, abstract, assert, catch, class, const, default, do, enum, extends, final, finally, goto, instanceof,  native, static, strictfp, super,switch, synchronized, throw, throws, transient, try, volatile, while, false, true, null.


Here we will just give and try to explain some of them.
We will beggin by the most common used:


- byte: Is used to return a 8-bit value;
- boolean : Used to return a boolean value(true or false);
- break: Used to stop immediately the execution of a statement;
- case: Used to declare individual cases of statements;
- char: Is used to return a 16-bit unicode value;
- continue: used to resume a current loop;
- extends : Used in interface;
- final: Used for expression which cannot be changed, a final class
  cannot be subclassed, a final method cannot be overriden, a final 
  variable can occur at most once.
- float : Is used to return a 32-bit value;
- for: Used to create a loop using some conditions;
- if -else: Used when we need to verify if the statement is true or 
  false.it will run if it is true, block the statement if it is false;
- implements : Used in interface;
- import: As the meaning of the name, used to import some classes,
  function without using the whole package;
- int: Is used to return a value of type int which means a value
  which has 32 bits;
- interface: Used to declare a special class that will be used by
  implementation or extends. That class only contain abstracts methods
- long: Is used to return 64-bit value;
- new: Used to create a obect, an array
- package: "package" is a group of  types (classes, enum, interface);
- private: The "private" keyword is also used in declaration of
  function, classes and means that the element can only be used by
  the class which contain it. A private function from an inherit  
  father class can't be used in a subclass;
- protected: The use of "protected"  keyword is the same as the one 
  of "private" on the difference that it can only be used by the
  variable or function in the same package, class or function;
- public:  The "public" keyword is used in declaration of functions,
  classes and means that the class (function) can be used by every
  other class in the same package;
- return: Is used to finish a execution of a method and will be
  followed by a particle which needs to be to be called at the end of
  the execution;
- short: Is used to return 16-bit value;
- static: a static function can be run directly by the class without
  creating an object. static obecjts can alse be used by other
  classes in this format(classname.objectname);
- super: will call a method from an inherit parent class;
- this: Used to give a relationship between a function and a variable
- void: Is used to declare a function tahat doesn't return any value;
- false: Used in boolean to mean that a statement is false;
- true: Used in boolean to mean that a statement is true;
- null: Which means without value,
- while: Used to create a loop which use the boolean expression.

你可能感兴趣的:(java)