Posts

Showing posts from January, 2020

Reserved Keywords in Scala

Image
Scala Keywords Keywords or Reserved words are the words in a language that are used for some internal process or represent some predefined actions. These words are therefore not allowed to use as variable names or objects. Doing this will result in a compile-time error. And one more interesting fact... public and default is not a keyword in Scala, we can use this word as we like as per below example : Scala contains following keywords: <-            Delimits a generator from its identifier in a for-loop. ←            A single-character (\u2190) alternative to <-. <:             The upper-bound operator, restricting types to those that are equal to or extend the given type. <%          The view-bound operator, allowing any type that may be treated as the given type. =              The assignment operator. =>            Used in match expressions and partial functions to indicate a conditional expression, in function types to indicate a ret