Hello World Snippet

/** * Write a short description of what the class does * Prints Hello World to the console * @author Sameer * @version 1.0 */ public class HelloWorld//class header { //every open bracket need a closed bracket //main method below is ignition of a program (not every class has one) public static void main(String[] args) { //prints "Hello, World" to the console //each line ends in semicolon System.out.println("Hello, World"); } }
Printing "Hello World"

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.