Created
January 25, 2021 14:52
-
-
Save deanwampler/8e1797bf62c5e9b4193eae4014e8263e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
scala> case class Person(name: String, age: Int): | |
| def this(name:String) = this(name, 18) | |
// defined case class Person | |
scala> Person("Dean", 100) | |
val res2: Person = Person(Dean,100) | |
scala> Person("Dean") | |
1 |Person("Dean") | |
|^^^^^^^^^^^^^^ | |
|missing argument for parameter age of method apply: (name: String, age: Int): Person | |
scala> new Person("Dean") | |
val res3: Person = Person(Dean,18) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment