You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Classes/README.md
+1-4
Original file line number
Diff line number
Diff line change
@@ -88,9 +88,6 @@ public class Vars
88
88
89
89
### One of the big three in OOP. There is Encapsulation, Inheritance and Polymorphism.
90
90
### Encapsulation is the process by which we hide the inner details of something. This way will enable us to not expose everything to the whole world. Encapsulation
91
-
### takes place a lot when working with class level variables/fields. So we created a variable within the class method not within the method. This variable will be
92
-
### accessible all throughout the class. When we instantiate an object of the class. When we work with the variable we are using encapsulation when working with
93
-
### getter and setter methods of that variable. To get the value of the variable we have to go through the getter and this will output the value back to us in the
94
-
### console. If we want to set the value of the variable we have to go through the setter and it will update the value. Within the methods, we can modify and tweak
91
+
### takes place a lot when working with class level variables/fields. So we created a variable within the class method not within the method. This variable will be accessible all throughout the class. When we instantiate an object of the class. When we work with the variable we are using encapsulation when working with getter and setter methods of that variable. To get the value of the variable we have to go through the getter and this will output the value back to us in the console. If we want to set the value of the variable we have to go through the setter and it will update the value. Within the methods, we can modify and tweak
95
92
### it a little bit. Think of a service you are providing to people we can use encapsulation that way we hide the inner workings and the user will not be able to
96
93
### see it. We can swap the inner workings without affecting the interface.
0 commit comments