Why to use Getters and Setters in Java ? Hindi

Поделиться
HTML-код
  • Опубликовано: 4 фев 2025
  • 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/learncode...
    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): learncodewithd...
    👉Telegram Discussion Group: t.me/learncode...
    👉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.

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

  • @mitsixty4011
    @mitsixty4011 3 года назад +8

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

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

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

  • @NeerajVats-d9r
    @NeerajVats-d9r 11 месяцев назад +1

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

  • @bobbybhatta9957
    @bobbybhatta9957 3 года назад +3

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

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

    bhai Bohot badhiya .

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

    Kitna easy samjhate ho yar aap
    Thanks Durgesh bhai 🙏

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

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

  • @talhafarhat5851
    @talhafarhat5851 8 месяцев назад +1

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

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

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

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

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

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

    Jabardast bhai keep it up.

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

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

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

    Good Going Durgesh Sir... Very Explanatory 👌

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

    Very nice explanation
    👌

  • @goyaldeekshant
    @goyaldeekshant Год назад +1

    perfect getter setter example

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

    Sir aap bahut achhe se samjhate ho

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

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

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

    Very helpful video.... Great Sir

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

    Wonderful video 😊

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

    starts from 1:07
    getters and setters 8:17

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

    Very useful video 💯

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

    thanks bro i am from italy great video

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

    Thanks...I'm from Gurgaon

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

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

  • @SDIT014B-NEHA
    @SDIT014B-NEHA 7 месяцев назад

    Thank you for this wonderful video.

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

    Thanks Durgesh for Clearing out the Concept!

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

    This video is very helpful sir..

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

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

  • @ravisahu968
    @ravisahu968 3 года назад +38

    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 3 года назад +2

      Right 💯

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

      Hn Sir

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

      Bana diye sir video ek

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

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

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

      @Ravi sahu u hv to use scanner

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

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

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

    Durgesh bhai Amazing 👏

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

    Nice explanation

  • @CosmosHole
    @CosmosHole 3 года назад

    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)

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

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

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

    Very good information

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

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

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

    thank u Soooomuchhhhhhhh❤❤❤❤❤❤❤❤

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

    Thanks sir.... Really helpful ..

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

    Finally...itna search krne baad ab jaa kar getter and setter samajh Aaya😂

  • @MohdDanishMansoori-o5k
    @MohdDanishMansoori-o5k Год назад

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

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

    Please constructor ke use pe bhi video banao sir..

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

    nice explation. mumbai se

  • @raushansinghrana9048
    @raushansinghrana9048 3 года назад +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?

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

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

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

    Excellent

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

    please make video on constructor..

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

    your video is very helpful

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

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

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

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

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

    Thanks bhai❤

  • @Rohit_Sontakke
    @Rohit_Sontakke 27 дней назад

    ✅Best video on Getter and Setter [Encapsulation] on youtube.

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

    amazing sir,thanks for answering the question

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

    Please make series of video on design pattern..

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

    It would be great if you showed example for getters

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

    Absolutely fine ❤

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

    Thank you so much sir ❤️

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

    Thank you sir.

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

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

  • @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.

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

    Really helpful video

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

    Bahut achaa

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

    Sir Mujhe Testing to Development switch karna hai kuch suggestions ?

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

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

  • @duaa6077
    @duaa6077 5 месяцев назад

    what is the name of playlist of this video? where I can find this?

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

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

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

    Yes sir we need constructor video

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

    Thanks for this video

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

    Yes make video on constructor

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

    Sir please make video on apache poi

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

    Sir i love this tutorial Encapsulation video create

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

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

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

    Please make video on yguard obfuscation and Proguard obfuscation

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

    Sir all Annotation kase print kr sakte
    Reflection api

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

    Interesting video

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

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

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

    Sir please make level 2 of spring boot microservices

  • @grv999
    @grv999 3 года назад +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 2 года назад

      Same question

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

      Getter used for return the data which is set by setter

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

      @@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?

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

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

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

    Getter or setter ka calling proccesory kya hai???

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

    Sir AP Please ek video constructor pe banaiye

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

    I got this question in interview.

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

    Does it breaking the rules of polymorphisms ?

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

    Thank you!

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

    Please make video for plugging datatable in jsp🙏

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

    good

  • @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

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

    Upgrade to "records" (v19 onwards?)... avoid the need to use getters/setters.

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

    Awesome❤

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

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

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

    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

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

    Sir please make some videos on liferay....

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

    Awesome

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

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

  • @shubhasheeshkundu9933
    @shubhasheeshkundu9933 3 года назад

    Sir plzz Python ke djago pe bhi video banaiye...

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

    Sir please make play list of all this java tutorial

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

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

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

    Nice

  • @SurajRoy
    @SurajRoy 11 месяцев назад

    But in main class i can validate data before storing it into variable ... So...

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

    Perfect

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

    Can we have a live implementation of api in java

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

    Amaizing !!! ...