Scala with IntelliJ IDEA

1- Defining a package object

  1. On the project side bar right click on Scala folder –> new –> package.
  2. name the package custom.methods.
  3. Right click on custom.methods –>new –> package object

The package object is now ready.

package custom
package object methods {
// define your custom classes, case classes, objects, methods here
}