Hello,
If you have a case class, the compiler will add an apply method to its companion object that takes the same arguments as the primary constructor of the case class, passes them to the primary constructor, and returns the constructed instance. If you did not declare a companion object, the compiler will create one.
If you access Scala code from Java code, a class and its companion object will look like the same class on the Java side, with the members of the companion object being the static members.
Best, Oliver