Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package lessons;
- //this is my first program
- //
- // sept 18, 2019
- // Computer Science
- //these are single line comments
- /*
- * this is a
- * multi line
- * comment
- */
- // jvm looks for the class to find the main method to find rthe code and then runs whats in mainM
- //this marks beginning of a class, it is a keyword and starts a class, the line below is 'class headder'
- public class HelloWorld
- {
- //public is access specifier, the line below is called 'main method'
- public static void main(String[] args)
- { //system is a class, out is a member of object, inside parentheses is an argument, inside quotes is a sting literal
- System.out.println("Hello World!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement