Java Keywords
In Java, a keyword is a reserved word that has a special meaning and cannot be used as an identifier (e.g., variable name, class name, method name, etc.) in the program.
Some examples of keywords in Java are:
class: used to define a classpublic: used to declare a member as accessible from outside the classprivate: used to declare a member as accessible only within the classstatic: used to declare a member as a class-level membervoid: used to indicate that a method does not return any valueif,else: used for conditional branching in the programfor,while: used for loop control in the programnew: used to create an instance of a classfinal: used to declare a variable as a constant.
Comments
Post a Comment