Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the responsive-lightbox domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the hueman domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/wp-includes/functions.php on line 6114
Scala – OOPs concepts - Testingpool

Scala – OOPs concepts

Scala combines object-oriented and functional programming in one concise, high-level language. The name Scala comes from the word scalable, and true to that name, it’s used to power the busiest websites in the world, including Twitter, Netflix, Tumblr, LinkedIn, Foursquare, and many more.

Scala is a pure object oriented programming language. Every value is an object, and every “operator” is a method.For example, when you say 1 + 2 in Scala, you are actually invoking a method named + defined in class Int.

It’s also a functional programming (FP) language, so functions are also variables, and you can pass them into other functions. You can write your code using OOP, FP, or combine them in a hybrid style.

In principle, the motivation for object-oriented programming is very simple: most programs need some sort of structure. The great idea of object-oriented programming is to put data and operations into some form of containers and make them fully general and they themselves treated as values can be stored in containers or passed as parameters to operations. Such containers can be called as objects. We will study more about OOPs concepts in detail in coming chapters.

Avatar photo

Shekhar Sharma

Shekhar Sharma is founder of testingpool.com. This website is his window to the world. He believes that ,"Knowledge increases by sharing but not by saving".

You may also like...