1cfd3bbb56
Topic_CSS/Topic_HTML/Topic_JavaScript/Topic_Prompt/Topic_Comfyui 등 기존 카테고리 폴더를 정리하고, Topic_Graphic/Dev 등 신규 산출물과 Topics 내부 세션/메모리 기록을 동기화.
3.8 KiB
3.8 KiB
id, title, category, status, verification_status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, created_at, updated_at, review_reason, merge_history, tags, raw_sources, applied_in, github_commit
| id | title | category | status | verification_status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | created_at | updated_at | review_reason | merge_history | tags | raw_sources | applied_in | github_commit | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| java-non-access-modifiers | Java Non Access Modifiers | Programming_Language | draft | conceptual |
|
B | 0.88 | 2026-07-04 | 2026-07-04 |
|
|
Java Non Access Modifiers
🎯 한 줄 통찰 (One-line insight)
static methods "cannot use variables or methods that belong to an object" — this is the key limitation that separates them from instance methods, and it directly explains why main() (always static) needs an object to call any instance method inside it. [S1]
🧠 핵심 개념 (Core concepts)
- Non-access modifiers — don't control visibility, but add other features; most common:
final,static,abstract. [S1] final— prevents attribute values from being overridden. [S1]static— belongs to the class itself; callable without creating an object; shared across all instances; CANNOT access object-specific (instance) members. [S1]abstract— an abstract method has no body; the body is provided by a subclass; only valid inside an abstract class. [S1]- Class-level list — for classes:
final(cannot be inherited) orabstract(cannot instantiate directly). [S1] - Member-level list —
final,static,abstract,transient(skipped during serialization),synchronized(one-thread-at-a-time access),volatile(always read from main memory, no thread-local caching). [S1]
📖 세부 내용 (Details)
- Final attributes:
final int x = 10; final double PI = 3.14; ... myObj.x = 50; // Error. [S1] - Static method call without object:
static void myStaticMethod() {...} ... myStaticMethod(); Main.myStaticMethod();. [S1] - Abstract class/method:
abstract class Main { public abstract void study(); } class Student extends Main { public void study() { System.out.println("Studying all day long"); } }. [S1]
⚖️ 모순 및 업데이트 (Contradictions & updates)
- static의 제약: 클래스 자체에 속하므로 객체 없이 호출 가능하지만, 객체에 속한 변수/메서드는 사용할 수 없다는 점이 명시됨. [S1]
🛠️ 적용 사례 (Applied in summary)
현재 발견된 실제 적용 사례가 없습니다 — abstract 클래스/메서드는 상속(Inheritance)/추상화(Abstraction) 챕터에서 본격적으로 다뤄지는 개념의 예고편이다. [S1]
💻 코드 패턴 (Code patterns)
Abstract class with subclass providing the method body (Java):
abstract class Main {
public abstract void study(); // no body
}
class Student extends Main {
public void study() {
System.out.println("Studying all day long");
}
}
✅ 검증 상태 및 신뢰도
- 상태: draft
- 검증 단계: conceptual
- 출처 신뢰도: B (W3Schools — widely used educational reference, not a primary standards body)
- 신뢰 점수: 0.88
- 중복 검사 결과: 신규 생성 (New discovery)
🔗 지식 그래프 (Knowledge Graph)
- 상위/루트: Java Tutorial
- 관련 개념: Java Modifiers, Java Inheritance, Java Abstraction, Java Constants Final
- 참조 맥락: static/abstract/final의 기초 — 상속/추상화 챕터에서 심화.
📚 출처 (Sources)
- [S1] W3Schools — Java Non-Access Modifiers — https://www.w3schools.com/java/java_non_modifiers.asp
📝 변경 이력 (Change history)
- 2026-07-04: Initial draft synthesized from the W3Schools "Java Non-Access Modifiers" page (Astra wiki-curation, P-Reinforce v3.1 format).