-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9fa7d79
commit ff65c82
Showing
5 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
...ms/jeorg-kotlin-crums-1/src/main/java/org/jesperancinha/ktd/crums1/records/VinylJava.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package org.jesperancinha.ktd.crums1.records; | ||
|
||
public record VinylJava(String title, Long year) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...-crums/jeorg-kotlin-crums-1/src/main/kotlin/org/jesperancinha/ktd/crums1/records/Vinyl.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package org.jesperancinha.ktd.crums1.records | ||
|
||
data class Vinyl(val title: String, val year: Long) |
11 changes: 11 additions & 0 deletions
11
...eorg-kotlin-crums-1/src/main/kotlin/org/jesperancinha/ktd/crums1/records/VinylLauncher.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.jesperancinha.ktd.crums1.records | ||
|
||
class VinylLauncher { | ||
companion object{ | ||
@JvmStatic | ||
fun main(args: Array<String> = emptyArray()) { | ||
println(VinylJava("The mountain -> Why does a record need an empty body?", 1923)) | ||
println(Vinyl("The mountain -> Data classes don't need an empty body and they do the same thing!", 1923)) | ||
} | ||
} | ||
} |