class나 method같은거 public 이나 private 붙이잖아
이런것도 속도나 메모리에 영향 줌?
예를 들어 같은 클래스 내에 기능을 하는 method 같은거 거 두개 만들고,
하나는 public, 하나는 private로 접근지정자 붙이고 같은 클래스 내에서 호출하면
둘다 속도나 메모리 영향이 다르냐??
-----------------
class A{
public static int functionA(){
return 0;
}
private static int functionB(){
return 0;
}
public static void main(String[] args) {
functionA();
functionB();
//두 method는 속도나 메모리가 각각 다를까...?
}
}
리플렉션 쓸거 아니면 상관없음