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
- K8s
- CodePipeline
- cd
- entity graph
- spring
- mirror maker2
- transactionaleventlistener
- spring kafka
- consumer
- Kotlin
- topic생성
- QueryDSL
- Spring JPA
- JPA
- Spring Data JPA
- bean
- mysql
- ECS
- kafka
- AWS
- CI
- Entity
- API
- centos7
- Kubernetes
- PAGING
- Streams
- producer
- git
- offsetdatetime
Archives
- Today
- Total
목록Object (1)
Yebali

Static 이란? Java에서 Static 키워드를 사용한다는 것은 메모리에 한번 할당되어 프로그램이 종료될 때 해제되는 것을 의미합니다. Static 변수와 Static 메서드는 Static 메모리 영역에 존재하므로 객체가 생성되기 이전에 이미 할당이 되어 있습니다. 그렇기 때문에 객체의 생성 없이 바로 사용할 수 있습니다. Kotlin에서는 static 키워드 대신 object와 companion object 키워드를 사용합니다. Object Object는 최초 사용시 자동으로 생성되고, 생성자도 필요하지 않다. object Counter { var count = 0 fun countUp() { count++ } fun clear() { count = 0 } } fun main() { println..
Kotlin
2021. 9. 22. 21:43