Skip to content

Instantly share code, notes, and snippets.

@kunals201
Created August 21, 2018 08:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kunals201/43998225303546aec4a1a781c2e896a0 to your computer and use it in GitHub Desktop.
Save kunals201/43998225303546aec4a1a781c2e896a0 to your computer and use it in GitHub Desktop.
Example of Without using value class
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