Created
August 21, 2018 08:36
-
-
Save kunals201/43998225303546aec4a1a781c2e896a0 to your computer and use it in GitHub Desktop.
Example of Without using value class
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
case class User(id: Int, name: String) | |
case class Tweet(id: Int, content: String) | |
object Test extends App{ | |
val user = User(1, "Kunal") | |
val tweet = Tweet(11, "Scala Rocks") | |
println(s"User ID :- ${user.id}") | |
println(s"Tweet Content:- ${tweet.content}") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment