Declaration
Same as static
fields, to mark a method as static
you write the word static
before it.
class MyMath {
static int add(int a, int b) {
return a + b;
}
}
Same as static
fields, to mark a method as static
you write the word static
before it.
class MyMath {
static int add(int a, int b) {
return a + b;
}
}