What is Encapsulation in Java - OOP Concept

  Рет қаралды 72,493

Naveen AutomationLabs

Naveen AutomationLabs

Күн бұрын

Пікірлер: 49
@agitay272
@agitay272 4 жыл бұрын
You are the best in the market
@ILuvBilli
@ILuvBilli 5 жыл бұрын
But what is the advantage of encapsulation here? We can change the value of data member by setter method.
@rajdeepbhattacharjee2301
@rajdeepbhattacharjee2301 5 жыл бұрын
Great job. Keep up the good work
@ramareddybheemanagoud2331
@ramareddybheemanagoud2331 5 жыл бұрын
Awesome video naveen bro
@sindhusudhakaran1731
@sindhusudhakaran1731 4 жыл бұрын
This is great !! Thank you Naveen
@saurabh_mahurkar
@saurabh_mahurkar 3 жыл бұрын
If I can access private variables by using getter and setter methods then it is contradicting the whole purpose of encapsulation. You cannot access private variables by creating object of that class but you can access those variables by using getter and setter. Will you please elaborate on this?
@shehenazshaik6273
@shehenazshaik6273 5 жыл бұрын
can you please tell me is class variable and instance variable same?
@mr.nobody7139
@mr.nobody7139 5 жыл бұрын
Hey Naveen, could you please explain the actual difference between Encapsulation and Abstraction.
@rushhour403
@rushhour403 4 жыл бұрын
I was never successful in finding a tutorial that talks about what happens if the encapsulation is not done. Nobody has been able to give an example of how exactly a bad guy can create problems if the encapsulation is missed out.
@kubra1975
@kubra1975 5 жыл бұрын
very clear explanation thank you
@mohitgupta7145
@mohitgupta7145 3 жыл бұрын
Hi Naveen, thanks for the explanation. The Getters and Setters are defined outside main but inside the class however can we create the Getters and Setters in another class to access the private instance variables of this class.
@saha6447
@saha6447 3 жыл бұрын
Thank you for your amazing video.
@alagumuthuakhilachockaling4388
@alagumuthuakhilachockaling4388 5 жыл бұрын
Was great ,I understood it so well
@vishwanathanbala8045
@vishwanathanbala8045 5 жыл бұрын
@Naveen - Just wanted to understand how this approach of declaring class variables as "private" and calling them via getters and setters is different from having a constructor(int ssn, String empName, int empAge) to initialize these class level private variables while creating the object of the class ? - could reduce the lines of code in that case. Also was able to directly get them via objReference.variableName
@nandhanamtalkies2332
@nandhanamtalkies2332 5 жыл бұрын
Vishwanathan Bala I think , in the case of constructor for initialising values, we have to create multiple objects for executing scenarios with multiple values , it’s wasting memory. In this case we can execute multiple values with same object in same run.
@jyotibaviskar6282
@jyotibaviskar6282 3 жыл бұрын
Hey Navin, Can you make video on how these oops concept are used in framework. If it's already there please provide the link.. I have searched it in your videos I didn't get it. I am planning to resume my career after maternity. I have 2 years of gap.. It will e great help if you tell me from where to starts which playlist to follow. I have total 4.5 yrs of experience in automation and functional testinfg. But due to gap it's quite difficult to get into market again. I need help.
@h.rehaief3567
@h.rehaief3567 5 жыл бұрын
Great job! please more videos.
@Fnaf-vh9cs
@Fnaf-vh9cs 3 жыл бұрын
this was good man thanks for sharing
@bhavanagyarampalli8983
@bhavanagyarampalli8983 2 жыл бұрын
Thanks a lot sir
@srinivasbadhamoni2175
@srinivasbadhamoni2175 6 жыл бұрын
Thank you Naveen, great explanation :)
@mariabajwa8632
@mariabajwa8632 6 жыл бұрын
thanks naveen..
@puritymushaya8206
@puritymushaya8206 2 жыл бұрын
superb
@ummerubab6710
@ummerubab6710 5 жыл бұрын
Thankyou Greate Teacher!! :)
@sitoramarat5945
@sitoramarat5945 5 жыл бұрын
THANK YOU VERY MUCH .
@RaviKumar-sw1wc
@RaviKumar-sw1wc 6 жыл бұрын
Thankyou Naveen
@soundaryasoudi1134
@soundaryasoudi1134 4 жыл бұрын
Hi Naveen, Thanks for your video..To protect some fields, we are declaring them as private.. But with the help of getter and setter, we can access those as well right? Then what is the actual use of it.. Can you please tell me?
@kobbyfynn8043
@kobbyfynn8043 2 жыл бұрын
Generally this is considered good practice, because in real world applications , your setter and getter may not be simply be setting the values or getting the values. Example, consider a person class, modelling a person, with a field "age". Without this approach, users, can set age to negative numbers, which is not meaningful, so in a setter, one can restrict the values to be only positive and maybe throw exceptions when the age is negative
@skyleenkariuki2527
@skyleenkariuki2527 6 жыл бұрын
thank you from africa i have an exam thank u u saved me alot of reading lol
@naveenautomationlabs
@naveenautomationlabs 6 жыл бұрын
Awesome :). Keep learning
@parthjangid5966
@parthjangid5966 3 жыл бұрын
in real time, we only declare data members as private or we also initialize it ? and is that another reason for data hiding is that if any one wants to reuse the code so they can use it without harming the existing code ?
@jiteshsharma4692
@jiteshsharma4692 6 жыл бұрын
awesome.... keep it up... make more videos on Java oops concepts... And core Java part...more demand from " Pune Maharashtra ".. Thank you so much
@nalinaksheepanda1596
@nalinaksheepanda1596 5 жыл бұрын
Hi Naveen, Can you please make one more video on Lambda concept introduced in Java 8.
@mohitsingla5436
@mohitsingla5436 6 жыл бұрын
If outside user of the class is able to change the private variables values through getter and setter methods Then what is the seecurity point here?
@shivamdave6252
@shivamdave6252 6 жыл бұрын
In the setter method you can add security measures like checking whether the logged in user has proper entitlements to change the variable if not a message or a popup can be shown telling the user that they don't have sufficient privileges.
@hikikomori9387
@hikikomori9387 6 жыл бұрын
@@shivamdave6252 thank you...needed that explanation as well
@naziyahasan1577
@naziyahasan1577 6 жыл бұрын
well explained. thank you :)
@kalyanijoshi6884
@kalyanijoshi6884 6 жыл бұрын
hi naveen please post how to convert csv to json
@MrYashMundey
@MrYashMundey 4 жыл бұрын
Amazing Thank you :)
@ma8969
@ma8969 2 жыл бұрын
Thanks
@SanjayKumar-zx1dv
@SanjayKumar-zx1dv 2 жыл бұрын
if outside person can get the value then where is the security mechanism in encapsulation.
@naveenautomationlabs
@naveenautomationlabs 2 жыл бұрын
They don't have direct access on private data members, it has to be accessed via public methods. It's upto you want to give access via public layer.
@mayurpatil5370
@mayurpatil5370 5 жыл бұрын
emp.setEmpAge(27); emp.empAge = 30; what is difference between this two?
@yasirmehmood76
@yasirmehmood76 5 жыл бұрын
I think there's no difference between these two. To my understanding, by using encapsulation, we can completely hide variable or can give access to get or set the variable. That might not be possible without using private. Does this make sense?
@nandhanamtalkies2332
@nandhanamtalkies2332 5 жыл бұрын
Here Naveen explaining everything in one class that’s y you got that confusion. One class with private data variables and public getter and setter. Create object of that class in main class(separate class with main()) , we can only access public methods never private data and private methods( protected n friendly access modes are there it’s availability depends on inheritance and packages etc)..
@barshabhattacharjee6788
@barshabhattacharjee6788 4 жыл бұрын
For more visit : kzbin.info/www/bejne/p2O1mHl-ZteDpdU
@pardhasaradhinaidu602
@pardhasaradhinaidu602 6 жыл бұрын
dear my brother tell me slowly man.Thankyou
@naveenautomationlabs
@naveenautomationlabs 6 жыл бұрын
Pardhu Chowdary Mannem it's very slowly explained.
@sreesree7328
@sreesree7328 5 жыл бұрын
Naveen AutomationLabs i agree with u naveen all of ur videos are slow and easily catchable only.i thank u alot after searching for a long time i got ur videos.
Difference between Interface and Absract Class
30:52
Naveen AutomationLabs
Рет қаралды 183 М.
5 Tips For Object-Oriented Programming Done Well - In Python
16:08
Как Ходили родители в ШКОЛУ!
0:49
Family Box
Рет қаралды 2,3 МЛН
#behindthescenes @CrissaJackson
0:11
Happy Kelli
Рет қаралды 27 МЛН
БОЙКАЛАР| bayGUYS | 27 шығарылым
28:49
bayGUYS
Рет қаралды 1,1 МЛН
Air Sigma Girl #sigma
0:32
Jin and Hattie
Рет қаралды 45 МЛН
#40 Encapsulation in Java
11:42
Telusko
Рет қаралды 214 М.
Abstraction In Java (OOP Concept) - Interface v/s Abstract Class
47:22
Naveen AutomationLabs
Рет қаралды 61 М.
Encapsulation in Java Tutorial #83
11:06
Alex Lee
Рет қаралды 263 М.
Method Overriding, Inheritance and Polymorphism  in Java - Core Java - Part -13
34:01
Lambda Expressions in Java - Full Simple Tutorial
13:05
Coding with John
Рет қаралды 783 М.
Interface Concept and Multiple Inheritance In Java - Core Java - Part - 14
29:30
Naveen AutomationLabs
Рет қаралды 125 М.
Generics In Java - Full Simple Tutorial
17:34
Coding with John
Рет қаралды 1,1 МЛН
What is Build & Deployment Process || Release Cycle | CI - CD
28:06
Naveen AutomationLabs
Рет қаралды 210 М.
Как Ходили родители в ШКОЛУ!
0:49
Family Box
Рет қаралды 2,3 МЛН