Skip to content

Instantly share code, notes, and snippets.

@kunals201

kunals201/Test.scala

Created Aug 21, 2018
Embed
What would you like to do?
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