Skip to content

Instantly share code, notes, and snippets.

@priesdelly
Last active February 24, 2019 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save priesdelly/9afdc1c7451f7914a178df4bbb311380 to your computer and use it in GitHub Desktop.
Save priesdelly/9afdc1c7451f7914a178df4bbb311380 to your computer and use it in GitHub Desktop.
Example static method
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