Keywords are special words for a programming language that have some predefined actions in the programming. Thus, these keywords cannot be used as names for defining objects, classes, functions, variables, etc. The compiler will throw an error if we try to use keywords as identifiers.
Scala programming languages also
consist of a set of keywords to help in the efficient working of the program.
There are in total 39 keywords present
in Scala. Here is a list of all keywords in Scala,
- Abstract; 2. Case; 3. Catch; 4. Class; 5. Def; 6. Do; 7. Else; 8. Extends;
9. False; 10. Final; 11. Finally; 12. For; 13. Forsome; 14. If; 15. Implicit;
16. Import; 17. Lazy; 18. Match; 19. New; 20. Null; 21. Object; 22. Override;
23. Package; 24. Private; 25. Protected; 26. Return; 27. Sealed; 28. Super;
29. This; 30. Throw; 31. Trait; 32. Try; 33. True; 34. Type; 35. Val; 36.
Var; 37. While; 38. With; 39. Yield.
No comments:
Post a Comment