Why to use Getters and Setters in Java ? Hindi

Поделиться
HTML-код
  • Опубликовано: 10 окт 2021
  • In this video, I am going to explain what is setters and getters in java programming language and why to use getters and setters in java language with a practical session on Eclipse IDE.
    Telegram Link for Doubt: t.me/learncodewithdurgesh
    Important Videos:
    ➡️React JS with Project: • 🔥 🔥 Complete React Js ...
    ➡️Learn JDBC in one video: • JDBC Crash Course in 1...
    ➡️Learn Python in One Video: • Learn Python in One Vi...
    ➡️Learn HTML in one video: • Jquery in one video in...
    ➡️Learn HTML form in one video: • Jquery in one video in...
    ➡️Learn JavaScript in one video: • Learn JavaScript in O...
    ➡️Learn Form Validation using javascript and jquery: • Form Validation using ...
    ➡️Learn CSS in one video: • Jquery in one video in...
    ➡️Jquery in one video: • Jquery in one video in...
    Kotlin is one video: • Kotlin | Learn Kotlin ...
    ➡️Complete Python Project - RUclips downloader in one video: • Jquery in one video in...
    Important Playlist:
    ➡️Spring Boot Tutorial with Project: • Spring Boot Tutorial i...
    ➡️Spring MVC Tutorial: • Spring MVC Tutorial St...
    ➡️Complete Spring Framework Tutorial: • Spring Framework Tutor...
    ➡️Hibernate Tutorials: • Hibernate Tutorial for...
    ➡️E-Commerce Project using Java: • E-Commerce Project usi...
    ➡️AWS Free Java Hosting Playlist: • AWS Hosting Tutorial |...
    ➡️Hibernate Tutorial Playlist: • Hibernate Tutorial for...
    ➡️Learn Technology in One Vides: • Learn in one video : C...
    ➡️Programming Tips for Programmers: • Coding Tips and Discus...
    ➡️Complete Python for Beginners: • Complete Python Tutori...
    ➡️Important Python Projects: • Python Projects in Hindi
    ➡️Complete Servlet & JSP : • Servlet and Jsp (Serve...
    ➡️Complete JDBC ( Java Database Connectivity) : • JDBC(Java Database Con...
    ➡️Complete Java Project : TechBlog: • Full Java Advance Pro...
    ➡️Java Swing Projects: • Java Projects for begi...
    ➡️Java Core Concepts: • Java Core Tutorial
    ➡️Kya aap Jante hai Series: • kya app jante hai : s...
    Important Links:
    👉Official Website (Source Code): learncodewithdurgesh.com/
    👉Telegram Discussion Group: t.me/learncodewithdurgesh
    👉Follow me on Instagram: / durgesh_k_t
    👉Follow on Facebook / learncodewithdurgesh
    Disclaimer:
    All videos are for educational purposes and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.

Комментарии • 145

  • @sharuk3545
    @sharuk3545 2 года назад +1

    amazing sir,thanks for answering the question

  • @bhushankothari8613
    @bhushankothari8613 Год назад +2

    Sachme Dil Se Thank You Sir, abhi Jake samjh main aaya....😅👌🏻👍🏻🙏🏻

  • @reyheelb9805
    @reyheelb9805 Год назад

    Thanks Durgesh for Clearing out the Concept!

  • @rohitkushwaha6125
    @rohitkushwaha6125 Год назад

    Thank you so much for clearing the use of getter and setter.

  • @aashishchoyal9730
    @aashishchoyal9730 2 года назад

    Good Going Durgesh Sir... Very Explanatory 👌

  • @ManishKumar-cx1fs
    @ManishKumar-cx1fs 2 года назад +13

    Very nice sir, getter setter and private class variable helping to creating highly encapsulated class , and perform setter injection in spring

  • @umairsiddique5337
    @umairsiddique5337 2 года назад

    Thanks ❤..aisi or bi videos latey rahiye bhut si confusions dur hjati

  • @vinayghadigaonkar8215
    @vinayghadigaonkar8215 2 года назад +1

    bhai Bohot badhiya .

  • @talhafarhat5851
    @talhafarhat5851 Месяц назад +1

    Thanks Sir, you cleared my concept of using getters and setters + why we use.

  • @zeeshanahmad-tx5hw
    @zeeshanahmad-tx5hw 2 года назад +1

    Very helpful video.... Great Sir

  • @user-ut8xy1yx6s
    @user-ut8xy1yx6s 5 месяцев назад +1

    Video is very good , very informative , useful.
    I am from Australia .

  • @mitsixty4011
    @mitsixty4011 2 года назад +6

    Durgesh bhai maine apke videos dekh kr last week maine TCS me job nikala, apka ka bahut shukriya

  • @munairoy3364
    @munairoy3364 2 года назад

    Vedio is very good..it clear the confusion about getter and setter method.

  • @ravisahu968
    @ravisahu968 2 года назад +37

    Sir kya aap ek oops concept ka use krke ek real life project bnwa skte hai chhota sa plz . huMe PTA hai oops concept but real life kese use hoge wo sb clear nhi kai concept bnwa dijiye ek project simple sa

    • @zomzhack
      @zomzhack 2 года назад +2

      Right 💯

    • @faizanahmad7157
      @faizanahmad7157 2 года назад

      Hn Sir

    • @faizanahmad7157
      @faizanahmad7157 2 года назад

      Bana diye sir video ek

    • @haroonafridi7746
      @haroonafridi7746 2 года назад

      Yes sir yeh sahi bol raha hai reall life me uses kaise haii aik simply sy video banao sirr

    • @Crazzyyy_
      @Crazzyyy_ Год назад

      @Ravi sahu u hv to use scanner

  • @durgeshreenaidu7027
    @durgeshreenaidu7027 2 года назад

    Thanks so much sir( i was just creating the getter n setter by just right clicking but didn't know in deep why i am do so)

  • @husnainkylani9447
    @husnainkylani9447 2 года назад

    Amaizing !!! ...

  • @user-hi5og5xn7s
    @user-hi5og5xn7s Месяц назад

    Thank you for this wonderful video.

  • @sawantak
    @sawantak Год назад

    Kitna easy samjhate ho yar aap
    Thanks Durgesh bhai 🙏

  • @sachinsolanki3165
    @sachinsolanki3165 3 месяца назад

    Wonderful video 😊

  • @amritosh6214
    @amritosh6214 Год назад

    Absolutely fine ❤

  • @zomzhack
    @zomzhack 2 года назад +2

    Very useful video 💯

  • @hoshiyartewatia4959
    @hoshiyartewatia4959 2 года назад

    Durgesh bhai Amazing 👏

  • @pankajkolekar5725
    @pankajkolekar5725 Год назад

    This video is very helpful sir..

  • @samarthchandrakantgondhali
    @samarthchandrakantgondhali Год назад

    Fabulous teaching sir.........🤟🙏

  • @JotStudyHub
    @JotStudyHub 2 месяца назад

    Well explained sir 🎉

  • @ayanrajput4518
    @ayanrajput4518 Год назад

    Thanks sir.... Really helpful ..

  • @bobbybhatta9957
    @bobbybhatta9957 2 года назад +1

    Sir i am from Nepal..love from Nepal sir i watched your all videos ❤️❤️

  • @srr152
    @srr152 Год назад

    Very good information

  • @susmitapatil4847
    @susmitapatil4847 2 года назад

    Really helpful video

  • @sureshsodha4737
    @sureshsodha4737 Год назад

    Thank you sir.

  • @raushansinghrana9048
    @raushansinghrana9048 2 года назад +7

    Hi Durgesh Sir
    Can you make a video on Spring MVC with sts Or explain some concept like controller, Dao, DaoImpl, Dto Or Dtl?

  • @goyaldeekshant
    @goyaldeekshant 10 месяцев назад +1

    perfect getter setter example

  • @ashishpandey9887
    @ashishpandey9887 2 года назад

    your video is very helpful

  • @laeeqahmed9526
    @laeeqahmed9526 2 года назад

    Thank you!

  • @CodeCraze99
    @CodeCraze99 2 года назад

    thanks dogesh bhai.....................i got it

  • @SandeepKumar-so2st
    @SandeepKumar-so2st 2 года назад

    Thanks for this video

  • @bellalmahtab8220
    @bellalmahtab8220 Год назад

    Bahut achaa

  • @dushyantpatel6678
    @dushyantpatel6678 Год назад

    best video ,,,I am from Ahmedabad...keep it up......Thanks

  • @ghosh9390
    @ghosh9390 Год назад

    Nice explanation

  • @amitnehete7349
    @amitnehete7349 Год назад

    Very nice explanation
    👌

  • @darsh9192
    @darsh9192 Год назад

    Thanks bhai❤

  • @Kanha0321
    @Kanha0321 2 года назад

    Thank you so much sir ❤️

  • @MuhammadUmairShaykh
    @MuhammadUmairShaykh Год назад

    Excellent

  • @v2factsandupdates327
    @v2factsandupdates327 2 года назад

    Awesome

  • @VIPINkumar-hx9sf
    @VIPINkumar-hx9sf 2 года назад

    Sir aap bahut achhe se samjhate ho

  • @roxbury664
    @roxbury664 2 года назад +1

    Hello sir whats Difference between intilize ojbect through constructor vs setter method

  • @theshivrajofficial8444
    @theshivrajofficial8444 2 года назад

    Interesting video

  • @bishamkhatri6956
    @bishamkhatri6956 2 года назад

    sir are you really great ... i am impres your teaching way... constructor ki bhi ek video bana hai den

  • @hemantvitthal3732
    @hemantvitthal3732 2 года назад

    Perfect

  • @abhisheksamantray5244
    @abhisheksamantray5244 Год назад

    thank u Soooomuchhhhhhhh❤❤❤❤❤❤❤❤

  • @haroonafridi7746
    @haroonafridi7746 2 года назад

    Wow nice sir ..me from pakistan sir .apne bhut ache tariqe sy explain kiya .

  • @azimbihari
    @azimbihari 2 года назад

    nice explation. mumbai se

  • @keshavkoli951
    @keshavkoli951 2 года назад +1

    Sir i wanted to know what is the use of constructor and why we use it

  • @ranatalha8327
    @ranatalha8327 2 года назад

    thanks bro i am from italy great video

  • @superpower6633
    @superpower6633 2 года назад

    Thanks...I'm from Gurgaon

  • @javaautomaddy6916
    @javaautomaddy6916 2 года назад

    Nice

  • @vivekprajapati5694
    @vivekprajapati5694 2 года назад

    Sir ji ke tutorial to Maggie banane se bi easy h😍

  • @sabyasachibehera7020
    @sabyasachibehera7020 2 года назад

    Thnks sir

  • @sumedhtirodkar
    @sumedhtirodkar 2 года назад +1

    Please constructor ke use pe bhi video banao sir..

  • @andriodtech55
    @andriodtech55 2 года назад

    Sir i love this tutorial Encapsulation video create

  • @ranjeetrai5550
    @ranjeetrai5550 2 года назад

    Yes sir we need constructor video

  • @mrider8702
    @mrider8702 2 года назад

    which data type should to store @,#,$ like special characters?

  • @shivi2467
    @shivi2467 Год назад

    Awesome❤

  • @mitulbhalani1760
    @mitulbhalani1760 Год назад

    good

  • @yashthakur872
    @yashthakur872 Год назад

    Why we use default constructor if we are already using an argument constructor?? Plz make video on it

  • @iftekhar_ansari
    @iftekhar_ansari 2 года назад

    Haa bhai constructor ka v video banao......by the way ye video bahut helpful tha

  • @roaming.nomad0
    @roaming.nomad0 2 года назад +3

    Please make series of video on design pattern..

  • @ravindrakawale5161
    @ravindrakawale5161 2 года назад +1

    please make video on constructor..

  • @SandeepKumar-so2st
    @SandeepKumar-so2st 2 года назад

    Please make video for plugging datatable in jsp🙏

  • @adityashankar6884
    @adityashankar6884 2 года назад +2

    Sir AP Please ek video constructor pe banaiye

  • @nitish2808
    @nitish2808 2 года назад

    How do I access a protected getter setter in another package in Java?

  • @GameHub3457
    @GameHub3457 2 года назад +1

    Sir , springboot sikhane ke baad kya servlet & jsp sikhana zaruri he kya

  • @saiprasadambrale5369
    @saiprasadambrale5369 2 года назад

    Can we have a live implementation of api in java

  • @shrirammogal
    @shrirammogal 2 года назад +4

    Sir Mujhe Testing to Development switch karna hai kuch suggestions ?

    • @shahidanwar6254
      @shahidanwar6254 2 года назад +5

      java, hibernate, spring boot and rest api's........that's all you have to learn to switch to development.

  • @KashifKhan-tq1um
    @KashifKhan-tq1um 2 года назад

    Sir waiting for design patterns and core java

  • @deepalikhairnar2771
    @deepalikhairnar2771 2 года назад

    Please make video on yguard obfuscation and Proguard obfuscation

  • @GameHub3457
    @GameHub3457 2 года назад +1

    Sir please make level 2 of spring boot microservices

  • @user-ob9oe3mg9q
    @user-ob9oe3mg9q 11 месяцев назад

    hi, durgesh sir , i am from sultanpur........

  • @arunnair7584
    @arunnair7584 Год назад +2

    Name should be a class on its own. It could have lastname, first name, alias etc. Avoid using primitive types.

  • @appsgames3513
    @appsgames3513 2 года назад

    Sir please make play list of all this java tutorial

  • @BhardwajErSatyam
    @BhardwajErSatyam 2 года назад

    Sir all Annotation kase print kr sakte
    Reflection api

  • @deveshkumar4356
    @deveshkumar4356 2 года назад

    hello sir , Exam Portal : Coding Login at Backend using JWT Authentication Spring Security | Spring Security | Examportal #13
    is video me token generation me issue araha hai...generate token me username null ajata hai...pls help..bcz baki ka Exam project isse related code based hai

  • @debiprasaddash654
    @debiprasaddash654 2 года назад

    Sir core java ka real time Jo interview questions ata hai usko discuss kijiye plz

  • @zeeshanahmad-tx5hw
    @zeeshanahmad-tx5hw 2 года назад

    Sir please make some videos on liferay....

  • @bilalnizamani7447
    @bilalnizamani7447 2 года назад

    Does it breaking the rules of polymorphisms ?

  • @raghunathsutar6973
    @raghunathsutar6973 2 года назад

    Durgesh sir....java core basics link is not working...we don't find any videos.. please let us know where we can find java core expalined by you

  • @ahuramazda1766
    @ahuramazda1766 8 месяцев назад

    It would be great if you showed example for getters

  • @mayankchauhan9867
    @mayankchauhan9867 2 года назад

    Hi sir, my question is that you have made a method display in that also we can give condition then also it will work same

    • @AbhishekYadav-fx2qp
      @AbhishekYadav-fx2qp 2 года назад

      But the values will be set in the variable even though you throw error in display think in a large perspective you cannot check in every method were the variable is used hence it should be validated while creation only ...i think this can be a valid reason please feel free if any correction needed in my understanding

  • @arghadipbiswas6420
    @arghadipbiswas6420 2 года назад

    but if the code has a default constructor which is taking arguments the code also has another way to set the values of the private variable. So what is the solution?

    • @YT-vx9sz
      @YT-vx9sz Год назад

      Bro the default constructor doesn't have any parameters so I think it won't accept any arguments. For parameterized constructor I think we can add validations as well as we added them in setter methods.
      Correct me if I am wrong

  • @KumarVikram22
    @KumarVikram22 2 года назад

    Sir please make video on apache poi

  • @zomzhack
    @zomzhack 2 года назад +1

    Yes make video on constructor

  • @nimeshpandey4343
    @nimeshpandey4343 2 года назад

    Please make a video on how to make an exe file through install4j I need to know

  • @anirbanmanna2897
    @anirbanmanna2897 Год назад

    I got this question in interview.

  • @codenaman
    @codenaman Год назад

    If condition to aap directly bhi de sakte the jab class variable me value set kar rahe hai without setter getter.. usecase thoda ache example se explain kijiye.

  • @joybratadasgupta5643
    @joybratadasgupta5643 2 года назад

    Contsructor ka chaiye or OOPS concepts k upar bhi all in one from zero to hero...pls sir

  • @grv999
    @grv999 2 года назад +1

    Please correct me If I am wrong.
    You defined getter and setter method and for displaying you just directly accessing instance variables by its name, So what is the use of getter method then? Is it need to be call inside display method instead of directly accessing variables?

    • @ahmedbasha6527
      @ahmedbasha6527 Год назад

      Same question

    • @adityasrivastav0222
      @adityasrivastav0222 Год назад

      Getter used for return the data which is set by setter

    • @grv999
      @grv999 Год назад

      @@adityasrivastav0222 I know that but in his video, He ain't used/called getter method anywhere in the code. He only defined getter method and didn't called anywhere in the code, Then when to use/call getter method?

  • @vikas_roy_v1
    @vikas_roy_v1 2 года назад

    I'm waiting for constructor video.

  • @adil470
    @adil470 Год назад

    ❤❤❤❤

  • @HarishRathod-yl8nw
    @HarishRathod-yl8nw Год назад

    ye to ham constructor se bhi kar sakte hai to getter setter kyun?

  • @parmanjosan6687
    @parmanjosan6687 Год назад

    we can also do this using function then why are we using Getter and Setter?