๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

์ „์ฒด ๊ธ€

(374)
[Kotlin] interface ์•ˆ default method๋ฅผ ์ž๋ฐ”๋กœ ๋ณ€ํ™˜ํ•˜๊ธฐ ์ถœ์ฒ˜https://kotlinlang.org/docs/java-to-kotlin-interop.html#default-methods-in-interfaces Calling Kotlin from Java | Kotlin kotlinlang.orghttps://blog.jetbrains.com/kotlin/2020/07/kotlin-1-4-m3-generating-default-methods-in-interfaces/ Kotlin 1.4-M3: Generating Default Methods in Interfaces | The Kotlin BlogIn Kotlin 1.4, we’re adding new experimental ways for generating default methods in interfa..
[Kotlin] const val ์ถœ์ฒ˜https://thinking-face.tistory.com/185 [Kotlin] const, val, varKotlin์—์„œ ``const``๋Š” ์ปดํŒŒ์ผ ์‹œ๊ฐ„์— ๊ฒฐ์ •๋œ๋‹ค๋Š” ์˜๋ฏธ๋ฅผ ๊ฐ–๊ณ  ์žˆ๋‹ค. ํ”„๋กœ๊ทธ๋žจ์ด ์‹คํ–‰๋˜๋Š” ๋Ÿฐํƒ€์ž„ ์ด์ „์— ์ด๋ฏธ ๊ฒฐ์ •๋˜์–ด ๋ณ€ํ•˜์ง€ ์•Š๋Š”๋‹ค๋Š” ๊ฒƒ์ด๋‹ค. ๊ทธ๋ž˜์„œ ``const val``์€ ์ปดํŒŒ์ผ ์‹œ๊ฐ„์— ๊ฒฐ์ •๋˜๋Š” ์ƒ์ˆ˜thinking-face.tistory.comhttps://kotlinlang.org/docs/properties.html#compile-time-constants Properties | Kotlin kotlinlang.orghttps://stackoverflow.com/questions/37595936/what-is-the-difference-between-const-and-va..
[Kotlin] @JvmOverloads - ๋””ํดํŠธ ํŒŒ๋ผ๋ฏธํ„ฐ๋ฅผ ์ž๋ฐ”์—์„œ๋„ ์ด์šฉํ•˜๊ธฐ ์ถœ์ฒ˜https://kotlinlang.org/docs/java-to-kotlin-interop.html#overloads-generation Calling Kotlin from Java | Kotlin kotlinlang.orghttps://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-overloads/ JvmOverloads - Kotlin Programming Language kotlinlang.org ์ฝ”ํ‹€๋ฆฐ์˜ ๋””ํดํŠธ ํŒŒ๋ผ๋ฏธํ„ฐ๋Š” ์ž๋ฐ”๋กœ ์ปดํŒŒ์ผ๋˜๋ฉด ์‚ฌ์šฉํ•  ์ˆ˜ ์—†๋‹ค. ์ž๋ฐ”์—์„œ๋Š” ์ผ์ผ์ด ๋ชจ๋“  ํŒŒ๋ผ๋ฏธํ„ฐ๋“ค์„ ๊ธฐ์ž…ํ•ด์•ผ ํ•œ๋‹ค.@JvmOverlaods๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋””ํดํŠธ ํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ ์˜ค๋ฅธ์ชฝ๋ถ€ํ„ฐ ํ•˜๋‚˜์”ฉ ์ค„์–ด๋“œ๋Š” ์˜ค๋ฒ„๋กœ๋“œ๋œ ํ•จ์ˆ˜๋“ค์„ ์ƒ์„ฑํ•œ๋‹ค. ์ƒ์„ฑ์ž, ์Šคํ…Œํ‹ฑ ๋ฉ”์†Œ๋“œ ๋“ฑ์—๋Š”..
[Kotlin] @JvmField : ์ปดํŒŒ์ผ์‹œ ๊ฒŒํ„ฐ, ์„ธํ„ฐ ์—†์• ๊ธฐ ์ถœ์ฒ˜https://kotlinlang.org/docs/java-to-kotlin-interop.html#instance-fields Calling Kotlin from Java | Kotlin kotlinlang.org ์ฝ”ํ‹€๋ฆฐ์€ ์ž๋™์œผ๋กœ ํ•„๋“œ์˜ getter, setter๋ฅผ ์ƒ์„ฑํ•ด์ค€๋‹ค. ์ด์™€ ๊ฐ™์€ ์ƒ์„ฑ์„ @JvmFiled๋กœ ๋ง‰์„ ์ˆ˜ ์žˆ๋‹ค. ์ฝ”ํ‹€๋ฆฐ ์ฝ”๋“œ : @JvmField ์—†์ดclass User(id: Int) { var userId: Int = id} -> ์ž๋ฐ”๋กœ ์ปดํŒŒ์ผpublic final class User { private int userId; public final int getUserId() { return this.userId; } public final void ..
[Kotlin][Java] Kotlin ๋ฌธ์ž์—ด ์—ฐ๊ฒฐ์ด ์ž๋ฐ”๋กœ ์ปดํŒŒ์ผ ์‹œ์˜ ๋™์ž‘ ์ถœ์ฒ˜https://medium.com/%EC%8A%AC%EA%B8%B0%EB%A1%9C%EC%9A%B4-%EA%B0%9C%EB%B0%9C%EC%83%9D%ED%99%9C/java-string-%EC%97%B0%EC%82%B0-string-concat-d76a6eea75 javaโ€Š—โ€ŠString + ์—ฐ์‚ฐ (String Concat)StringConcatFactorymedium.comhttps://jerry92k.tistory.com/50 str1 ๊ฐ์ฒด ์ƒ์„ฑ, str1+"b" ๊ฐ์ฒด ์ƒ์„ฑ, str1+"b"+"c" ๊ฐ์ฒด ์ƒ์„ฑ ๊ทธ๋ž˜" data-og-host="jerry92k.tistory.com" data-og-source-url="https://jerry92k.tistory.com/50" data-og-url=..
[Kotlin][Java] Java์˜ Stream์ด ์žˆ์Œ์—๋„ Kotlin์˜ Sequence๋Š” ์™œ ๋งŒ๋“ค์—ˆ์„๊นŒ ์ถœ์ฒ˜Kotlin In Actionhttps://bcp0109.tistory.com/359 Kotlin Collections ์™€ Sequences ์˜ ์ฐจ์ด์  (feat. Java Stream)Overview Java8 ์—์„œ๋Š” Collection ์„ ๋‹ค๋ฃจ๊ธฐ ์œ„ํ•ด Stream ์„ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค. Kotlin ์€ Collections ์ž์ฒด์—์„œ filter, map ๋“ฑ์˜ ์—ฌ๋Ÿฌ ๊ฐ€์ง€ API ๋ฅผ ์ œ๊ณตํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๋งค๋ฒˆ .streams() ๋ฅผ ๋ถ™์ด์ง€ ์•Š์•„๋„ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•˜๋‹ค๋Š” ์žฅ์ bcp0109.tistory.com  ์ž๋ฐ”์˜ Stream๊ณผ ์ฝ”ํ‹€๋ฆฐ์˜ Collection, Sequence ๋น„๊ตhttps://bcp0109.tistory.com/359 Kotlin Collections ์™€ Sequences ์˜ ์ฐจ์ด์  (feat. Jav..
[ํ•จ์ˆ˜ํ˜• ํ”„๋กœ๊ทธ๋ž˜๋ฐ][Kotlin] ๊ณ ์ฐจํ•จ์ˆ˜ HOF High-order Function, Combinator Pattern ์ถœ์ฒ˜https://softwarepatternslexicon.com/patterns-kotlin/functional/combinator/ Combinator in KotlinExplore the Combinator Design Pattern in Kotlin, a powerful functional programming technique to combine functions, promoting flexible and reusable code. Learn how to implement and use combinators with real-world examples and programmatic illustrations.softwarepatternslexicon.comhttps://kotlinlang.org..
[Kotlin][ํ•จ์ˆ˜ํ˜• ํ”„๋กœ๊ทธ๋ž˜๋ฐ] ๋ฉค๋ฒ„ ์ฐธ์กฐ ์ถœ์ฒ˜Kotlin In Actionhttps://antonioleiva.com/function-references-kotlin/ Function references in Kotlin: use functions as lambdas everywhereFunction references allow to use regular functions as lambdas. With them you can write cleaner code in a more functional style.antonioleiva.comhttps://inpa.tistory.com/entry/JAVA8-%E2%98%95-%EB%9E%8C%EB%8B%A4%EC%8B%9D%EC%9D%84-%EB%8D%94-%EC%A7%A7%EA%B2%8C-%EB%A..