concept trait in category java

This is an excerpt from Manning's book Java 8 in Action: Lambdas, streams, and functional-style programming.
Scala has another useful feature for abstraction called traits. They’re Scala’s replacement for Java’s interfaces. A trait can define both abstract methods and methods with a default implementation. Traits can also be multiple inherited just like interfaces in Java, so you can see them as similar to Java 8’s interfaces that support default methods. Traits can also contain fields like an abstract class, which Java 8 interfaces don’t support. Are traits just like abstract classes? No, because traits can be multiple inherited, unlike abstract classes. Java has always had multiple inheritance of types because a class can implement multiple interfaces. Now Java 8, through default methods, introduces multiple inheritance of behaviors but still doesn’t allow multiple inheritance of state, something permitted by Scala traits.
To show an example of what a trait looks like in Scala, let’s define a trait called Sized that contains one mutable field called size and one method called isEmpty with a default implementation: