KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
According to this , Scala methods belong to a class. However, if I define a method in REPL or in a script that I then execute using scala, what class does the method belong to ? scala> def hoho(str:String) = {println("hoho " + str)} hoho: (str: String)Unit scala> hoho("rahul") hoho rahul In this example, what class does the method belong to ?
Tags (comma-separated)
Save Edits
Cancel