goodbye java 1

goodbye java

public static void main(String[] args){
  System.out.println("Goodbye Java");

Here is what the above code is Doing:
1. The first line is a comment. Comments are ignored by the compiler.
2. The second line is a package declaration. The package name is “com.example”.
3. The third line is an import statement. It imports the “java.lang” package.
4. The fourth line is a class declaration. The class name is “HelloWorld”.
5. The fifth line is a method declaration. The method name is “main”.
6. The sixth line is a statement. It prints “Hello World” to the console.

Similar Posts