Skip to content

Update scala-for-java-programmers.md #1216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion _overviews/tutorials/scala-for-java-programmers.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,10 @@ Apart from inheriting code from a super-class, a Scala class can also
import code from one or several *traits*.

Maybe the easiest way for a Java programmer to understand what traits
are is to view them as interfaces which can also contain code. In
are is to view them as interfaces which can also contain code (This
feature is available in Java since version 8 using the `default` keyword
as well as static methods. Default methods can be overriden in implementing
classes. Since Java 9 private methods can also be used in interfaces.). In
Scala, when a class inherits from a trait, it implements that trait's
interface, and inherits all the code contained in the trait.

Expand Down