Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Eclipse
- JavaScript
- android fragment
- Android Apk
- error
- Firebase
- spring
- Android Apk 이름
- release Apk
- css
- Android
- html
- Exception
- jQuery
- android error
- MySQL
- Java
- java error
- fragment
- Program type already present
- Android Apk 이름 변경
- release unsigned
- 안드로이드
- tomcat
- R프로그래밍
- DataTable
- FLUTTER
- apache gzip
- Kotlin
- CSS사용법
Archives
- Today
- Total
목록non-static method 'getclass()' cannot be referenced from a static context (1)
selfstarter
non-static method 'getclass()' cannot be referenced from a static context 해결방법
non-static method 'getclass()' cannot be referenced from a static context 해결방법 Error non-static method 'getclass()' cannot be referenced from a static context Code public static final String className = getClass().getSimpleName().trim();Case class의 전역에서 사용하려고 했다. 그런데 getClass는 static Method가 아니므로 전역에서 사용할 수 없다. Soution 정적메소드가 아닌 getClass()말고 클래스이름.class을 쓰면 된다
Server/Java
2020. 5. 23. 12:59