We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c657f9d commit aaff774Copy full SHA for aaff774
scala-core-modules/scala-core-10/src/main/scala/com/baeldung/scala/valsintraits/ValInTraitExamples.scala
@@ -17,7 +17,7 @@ object ValInTraitExamples {
17
def printCurrentTime(): Unit
18
}
19
object TimePrinterWithDefImpl extends CurrentTimePrinterWithDef {
20
- override var currentTime: LocalDateTime = LocalDateTime.now()
+ override def currentTime: LocalDateTime = LocalDateTime.now()
21
override def printCurrentTime(): Unit = println(currentTime)
22
23
0 commit comments