Important Keywords in Java
- abstract : It is a non-access modifier applicable for classes and methods.It is used to achieve abstraction. For more, refer abstract keyword in java
- enum : It is used to define enum in Java
- instanceof : It is used to know whether the object is an instance of the specified type (class or subclass or interface).
- private : It is an access modifier.Anything declared private cannot be seen outside of its class.
- protected : If you want to allow an element to be seen outside your current package, but only to classes that subclass your class directly, then declare that element protected.
- public : Anything declared public can be accessed from anywhere.
For more on Access Modifiers, refer Access Modifiers in Java
- static :It is used to create a member(block,method,variable,nested classe) that can be used by itself, without reference to a specific instance. For more, refer static keyword in java
- strictfp : It is used for restricting floating-point calculations and ensuring same result on every platform while performing operations in the floating-point variable.For more refer strictfp keyword in java
- synchronized : Applicable for blocks,methods.It is used to get synchronization in java. For more, refer Synchronized in Java
- transient : transient is a variables modifier used in serialization. At the time of serialization, if we don’t want to save value of a particular variable in a file, then we use transient keyword.For more refer transient keyword in Java
- volatile : The volatile modifier tells the compiler that the variable modified by volatile can be changed unexpectedly by other parts of your program. For more, refer volatile keyword in java
If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
Attention reader! Don’t stop learning now. Get hold of all the important Java Foundation and Collections concepts with the Fundamentals of Java and Java Collections Course at a student-friendly price and become industry ready. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.