Sunday, May 31, 2015

Java Keywords

Java keywords

    Java has a huge list of keywords.They are extensively used in writing the source code.Java keywords are the basic thing that a programmer should know to code.

List of Java keywords

1. private - makes method or variable accessible only within its own class.
2. public - makes class, method or variable accessible from any other class.
3. Protected - makes method or variable accessible to classes in same package or to subclasses of the class.
4. Class - indicates a class.
5. Extends - indicates a super class that subclass is extending.
6. Abstract - declares class that can not be initiated, or method that have to be implemented by non abstract subclass.
7. Interface - indicates an interface.
8. Implements - indicates an interface that the class is implementing.
9. new - creates a new instance of a class by calling class constructor.
10 . Native - indicates that method is written in a platform department language.
11. Strict - used in front of a method or class to indicate that floating point numbers will follow.
12 . Static - makes a method or a variable belong to a class as opposed to an instance.
13 . Volatile - indicates a variable may change out of sync because it is used in threads.
14 . Transient - prevents field from over being serialized.transient fields are always skipped when objects are serialized.
15 . Final - indicated that class is impossible to extend, method to override and variable to change value.
16 . Synchronized - indicates that method can be accessed only by one thread a time.
17 . Break - exits a block of code in which it is suitable.
18 . Case - executes a block of code dependent of switch condition.
19 . Continue - stops executing rest of loops code(that goes after) and starts new ileteration.
20 . Do - executes a block of code one time. Than based on while statement determines will it be executed again.
21 . Default - executes a block of code of non of switch statements are true.
22 . For - executes a conditional loop on block of a code.
23 . If - executes a logical test.
24 . Instanceof. Determines if a object is instance of a class, a superclass or a interface.
25 . Return - returns from method not executing and code that follows.
26 . Switch - indicates a variable that will be compared to case statements.
27 . While - executes a block in loop if given logical test it true.
28 . Finally - block of code that follows try block code and execute no matter how exception is handles.
29 . Catch - declares a block of code that executes if exception occurs.
30 . Throw - used to pass an exception to method that called this method.
31 . Throws - indicates an exception that can be thrown by a class or method .
32 . Assert - evaluates a conditional expression to verify the programmer's assumption.
33 . Try - block of code that will be tried, but which may cause an exception.
34 . Super - reference variable referring to immediate parent class (super class).
35 . This - reference variable to the imstance of current object.
36 . Boolean - a value indicating true or false.
37 . Byte - an 8 bit signed integer.
38 . Char - a Unicode character.
39 . int - a 32 bit signed integer.
40 . Float - a 32 bit signed floating integer.
41 . Long - a 64 bit signed floating point number.
42 . Double - a 64 bit signed floating point number.
43 . Void - indicates that method doesn't have return type.
44 . Goto - bad practice.
45 . Const - use public final static.
46 . Else - exucutes a block of code when it condition it not true.
47 . Import - declares what packages or class  to import in code.
48 . Package - define to which package code it belongs to.


Introduction

Java is a programming language that is concurrent, class based, object oriented and specifically designed to have as few implementation dependencies as possible.It is intended to let application developers 'write once, run away' (woes) . Java was originally developed by James Gosling at sun micro systems