Static method(Class method) and Instance method
class MyMath2 {
long a,b;
long add() {//no parameter
return a+b;//using iv
}
static add(long a, long b) {//parameter => local variable
return a+b;//parameter a and b
}
}Last updated