Reputation: 625
I am learning from Coursera tutorial,but my IDEA is different from the one in the course.This is the screenshot
When I try to create class,I got this
What should I change to get object instead of class?
Upvotes: 0
Views: 40
Reputation: 31252
When you ask to create a scala class, select the object
from dropdown
1) Create scala class
2) Select kind of scala class
but you will have to add main
method by yourself, or also can extend App
.
object ExampleApp {
def main(args: Array[String]): Unit = {
}
}
Upvotes: 3
Reputation: 164
When you open the dialog for new class, do not click "OK" and below the name of file, select dropdown "kind" to select object or traits.
Upvotes: 1