Last active
February 24, 2019 07:29
-
-
Save priesdelly/9afdc1c7451f7914a178df4bbb311380 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){ | |
Calculate foo = new Calculate(); | |
int value = foo.bar(10); | |
System.out.println("value = " + value); | |
} | |
} | |
class Calculate{ | |
public 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