Skip to content

Commit 7f130c9

Browse files
authored
Java do have default methods in interfaces.
Increased explanation about java's default methods in interfaces
1 parent eb81d98 commit 7f130c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/stdlib/Traits.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import org.scalatest._
1111
*/
1212
object Traits extends FlatSpec with Matchers with org.scalaexercises.definitions.Section {
1313

14-
/** Similar to interfaces in Java, traits are used to define object types by specifying the signature of the supported methods. Unlike Java, Scala allows traits to be partially implemented; i.e. it is possible to define default implementations for some methods. In contrast to classes, traits may not have constructor parameters.
14+
/** Similar to interfaces in Java, traits are used to define object types by specifying the signature of the supported methods. And like in Java 8 does with interfaces and default methods in them, Scala allows traits to be partially implemented; i.e. it is possible to define default implementations for some methods. In contrast to classes, traits may not have constructor parameters.
1515
*
1616
* Here is an example:
1717
*

0 commit comments

Comments
 (0)