객체지향 static 메서드와 instance 메서드
class Math2{ long a, b; long add() { //인스턴스 메서드 return a+b; } static long add(long, longb) { //클래스 메서드(static 메서드) return a + b; } } 호출 class Math2{ public static void main(String arg[]){ System.out.println(Math2.add(200L,100L); 클래스메서드 호출 '클래스이름.메서드' Math2 mm = new Math2(); // 인스턴스 생성 (iv 생성) mm.a = 200L; mm.b = 100L; System.out.printl(mm.add()); //인스턴스 메서드 호출 (iv로 작업) 인스턴스 메서드 인스턴스 생성 후 '참조변수.메..