Why Scala does NOT have 'static' keyword? What is the main reason for this decision?
Answer Posted / Kunal Sinha
The 'static' keyword in Java is used to define class variables and methods that belong to the class level, not an instance. Scala opted to avoid using this keyword because it encourages functional programming and discourages global state.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers