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
- Kotlin
- Exception
- Android Apk 이름
- R프로그래밍
- Program type already present
- css
- java error
- fragment
- release Apk
- spring
- Android Apk
- android fragment
- DataTable
- html
- jQuery
- Android
- Firebase
- Eclipse
- CSS사용법
- release unsigned
- tomcat
- error
- apache gzip
- MySQL
- JavaScript
- 안드로이드
- Android Apk 이름 변경
- android error
- FLUTTER
- Java
Archives
- Today
- Total
목록non-static method 'getclass()' cannot (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