Replies: 1 comment
-
static (정적 멤버)
특징
정적 변수 (static variable)
예: class Counter {
static int count = 0; // 모든 인스턴스가 공유
}정적 메서드 (static method)
예: class MathUtil {
static int add(int a, int b) { return a + b; }
}non-static (비정적 멤버)
특징
인스턴스 메서드 (instance method)
예: class Person {
String name; // 인스턴스 변수
void sayHello() {
System.out.println("안녕하세요, 저는 " + name + "입니다.");
}
}
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
키워드
Beta Was this translation helpful? Give feedback.
All reactions