Last active
February 24, 2019 07:29
-
-
Save priesdelly/8dadce5361f4aa4359742238002bec61 to your computer and use it in GitHub Desktop.
Example static 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 class TestStaticMethod{ | |
public static void main(String[] args){ | |
int value = Calculate.bar(10); | |
System.out.println("value = " + value); | |
} | |
} | |
class Calculate{ | |
public static int bar(int number){ | |
return number+10; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment