Static메소드에서 비Static 메소드 호출은 인스턴스 생성이 필요하다
public class StaticMethod{ public static void main(String []args)throws Exception{ StaticMethod sm=new StaticMethod(); sm.methodOne(); } public int methodOne(){ System.out.println("we are in first methodOne"); return 1; } }
2021.06.17