diff --git a/snippets/java/basics/hello-world.md b/snippets/java/basics/hello-world.md new file mode 100644 index 00000000..634b38eb --- /dev/null +++ b/snippets/java/basics/hello-world.md @@ -0,0 +1,18 @@ +--- +title: Hello-World +description: Prints Hello world in the console +author: SarvariHarshitha +tags: java, console, printing +--- + +```java +// This is the main class of the Java program +public class Main { + // The main method is the entry point of the program + public static void main(String args[]) { + // This statement prints "Hello, World!" to the console + System.out.println("Hello, World!"); + } +} + +``` \ No newline at end of file diff --git a/snippets/java/icon.svg b/snippets/java/icon.svg new file mode 100644 index 00000000..e51aae9c --- /dev/null +++ b/snippets/java/icon.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + +