π Java βHello, World!β Program β Line by Line Explanation public class Hello { public β Makes the class accessible from anywhere. class β Keyword used to define a class in Java. Hello β Name of the class. β οΈ Rule: The class name must match the file name (Hello.java). public static void main(String[] args) { public β Allows the JVM to access this method. static β Enables the method to run without creating an object of the class. void β Indicates the method does not return any value. main β Entry point of the Java program (execution starts here). String[] args β Command-line arguments passed to the program. System.out.println("Hello, World!"); System β A built-in Java class. out β Output stream connected to the console. println() β Prints text to the console and moves to a new line. "Hello, World!" β The message displayed on the screen. } Closes the main method. } Closes the Hello class. β Output Hello, World!