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 |
BY Best Interview Question ON 04 Apr 2020
S.no | functions | methods |
---|---|---|
1. | Defined in Package | Defined in a class |
2. | Can be accessed without objects | Cannot be used without an object |