프로그래머스 자바 입문 - static 메소드는 static한 변수만 사용 가능하다

itonse·2023년 10월 20일
0

JAVA

목록 보기
5/19
public class VariableScopeExam{
    static int value = 10;     // static한 변수
    int value2 = 20;     // static하지 않은 변수
    
    public static void main(String []args){
        System.out.println(value);
        System.out.println(value2);    // 이 부분에서 오류 발생 !
    }
}

0개의 댓글

관련 채용 정보