What is the difference between Function and Method in Scala?
S.no | functions | methods |
---|---|---|
1. | Defined in Package | Defined in a class |
2. | Can be accessed without objects | Cannot be used without an object |
S.no | functions | methods |
---|---|---|
1. | Defined in Package | Defined in a class |
2. | Can be accessed without objects | Cannot be used without an object |