Last active
May 20, 2017 00:39
-
-
Save dhust/6144627 to your computer and use it in GitHub Desktop.
An example of a basic method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void main(String[] args) { | |
// Three "calls" to the method 'printStuff' | |
printStuff(); | |
printStuff(); | |
printStuff(); | |
} | |
// This code only runs if it's "called" | |
public static void printStuff () { | |
System.out.println("Hello earth"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment