What is keyword in java ? with example.
In : BSc IT Subject : Structure Programming Methodology - JavaIn Java, a keyword is a reserved word that has a special meaning and purpose in the language. These words are part of the syntax and cannot be used as identifiers (like variable names, method names, or class names). Keywords tell the compiler how to interpret the code. For example, `class` is used to define a class, `public` sets access levels, and `static` allows methods to run without creating objects.
##Example:
public class Hello {
public static void main(String[] args) {
System.out.println("Hello Java");
}
}
Here, `public`, `class`, `static`, and `void` are all Java keywords. Each plays a specific role in defining how the program works.