The Mystery of Traits in Scala

Crack the code — getting familiar with traits in Scala.

In this blog, we are getting familiar with traits in Scala and try to gather some knowledge on how to implement them in code. We will understand the trait in a better way by comparing it with Java language features like interfaces and abstract classes. 

Access and Non-Access Modifiers in Java

In Java, a modifier has a reserved keyword that is included in the definition of class, method, and variables. A modifier adds some meanings to these definitions. Modifiers are also called specifiers.

These modifiers are classified into two categories. Some of the modifiers are called access modifiers and some are called non-access modifiers.