for for (item in collection) print(item) for (item: Int in ints) { // ... } for (i in 1..3) { println(i) } for (i in 6 downTo 0 step 2) { println(i) } for (i in array.indices) { println(array[i]) } for ((index, value) in array.withIndex()) { println("the element at $index is $value") } while while (x > 0) { x-- } do { val y = retrieveData() } while (y != null) // y is visible here! Returns and j..
if var max = a if (a b) { max = a } else { max = b } // As expression val max = if (a > b) a else b // blocks val max = if (a > b) { print("Choose a") a } else { print("Choose b") b } when when (x) { 1 -> print("x == 1") 2 -> print("x == 2") else -> { print("x is neither 1 nor 2") } } when (x) { 0, 1 -> print("x == 0 or x == 1") else -> print("other..
Operator Overloding //example 1 operator fun Int.plus(b: Int) = this + b //example 2 operator fun Int.plus(b: Any): String { return "$this $b" } println(10 + "ABC") // 10 ABC //example 3 data class Position(val a: Int, val b: Int) { operator fun plus(item: Position): Position { return Position(a + item.a, b + item.b) } } val positionOne = Position(1, 2) val positionTwo = Position(3, 4) println(p..
- Total
- Today
- Yesterday
- Query DSL
- Join Table
- Discriminate Mapping
- Spring JDBC Template
- Embedded Mapping
- docker
- Spring
- Charles proxy
- guava
- Akka
- scikit-learn
- Spring Registrar
- Mapping
- Typesafe Config
- Criteria
- Sprint RetryTemplate
- spring spel
- @Primary
- SmartLifecycle
- Embeddable Mapping
- java generic
- JPA Criteria
- Property
- JPA
- 복합키 Mapping
- java Equals
- Registrar
- RetryTemplate
- java EqualsAndHashCode
- DI
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |