does a Java getter incur a performance penalty
- by alan
if i have the code
int getA(){
return a;
}
and then do something like
int b = obj.a();
instead of
int b = obj.a;
will that mean that the stack will have to be pushed and popped ultimately slowing down my code?