아니요, "이 " 키워드는 클래스의 정적 멤버를 참조하는 데 사용할 수 없습니다. 이는 "this ” 키워드는 현재 개체를 가리킵니다. 클래스 및 정적 멤버는 호출할 개체가 필요하지 않습니다. 클래스의 정적 멤버는 객체를 만들지 않고 직접 액세스할 수 있습니다. t 자바에서.
예시
public class StaticTest {
static int a = 50;
static int b;
static void show() {
System.out.println("Inside the show() method");
b = a + 5;
}
public static void main(String[] args) {
show();
System.out.println("The value of a is: " + a);
System.out.println("The value of b is: " + b);
}
} 출력
Inise the show() method The value of a is: 50 The value of b is: 55