Lecture 18 this Keyword in Java Hindi

Sdílet
Vložit
  • čas přidán 26. 09. 2015
  • Like, Comments, Share and Subscribe

Komentáře • 123

  • @wiz9870
    @wiz9870 Před 4 lety +21

    I wish I would have seen these videos when I was searching for a job. Bdw thanks sir, you're doing a great job. U have a special gift which u like to share with everyone... True Teacher

  • @TechHints
    @TechHints Před 5 lety +54

    "GiftTaker" ka obj instance "gf" banana kafi real life example tha....haha

    • @TechHints
      @TechHints Před 3 lety

      @Roger Clayton so what did you find? her other boyfriends?😜

  • @agnivo285
    @agnivo285 Před 8 lety +17

    Bahut bahut dhanyavad Sir, Am working as a Android developer...this all deep description always helps to recall and rectify my old knowledge.
    My kind request to u Sir, please do upload videos according your HTML CSS Jquery channel too.
    Shukriya...pleasure from Kolkata :)

  • @rajancrazyvlogs6087
    @rajancrazyvlogs6087 Před 5 lety +1

    Sirg aap ne itna achha padhaya hai this aur super keyword ko aisa koi kabhi v padha hi nhi skta... Mtlb itna achha aur itna mast padhate hai na app ki...ekdam har chij dikhata hai aakh band krne pe...
    Thanks sirg
    Very very thanks

  • @rajivtripathi8403
    @rajivtripathi8403 Před 4 lety +1

    Super Complex Concept in Simplest Way!!!! Grt Grt Job!!!

  • @siddharthnorajannavar4455
    @siddharthnorajannavar4455 Před 5 lety +10

    I want to meet you sir just once in my lifetime to take your blessing.

  • @vitalitylifecare8000
    @vitalitylifecare8000 Před rokem

    very much supportive contents for new bies like me .....really really thankyou so much 🙏🙏🙏

  • @uzairafridi5589
    @uzairafridi5589 Před 3 lety +1

    Thank you Sir for the video. It is really helpful.

  • @_hulk748
    @_hulk748 Před rokem +1

    Great Explanation Sir🙇‍♂🙏❤✨

  • @sahilmishra1473
    @sahilmishra1473 Před 5 lety +4

    Ur teaching is excellent sir. But plz improve sound of video

  • @rajvaghela4378
    @rajvaghela4378 Před 3 lety +2

    Very nicely explained!

  • @smrutitech001
    @smrutitech001 Před 6 lety

    Bahat accha sir. Hindi main java itna easy aur simple tarike se sikha rahe hain bahat accha lag raha. Ek request he ki java programming jaise duplicate string find, pyramid, buble shot, find highest number in a given series jaise programing code ko easy tarike se samajhane ki video banaiye. Please.

  • @krunalkp1032
    @krunalkp1032 Před 6 lety +14

    Here is given the 6 usage of java this keyword.
    1.this can be used to refer current class instance variable.
    2.this can be used to invoke current class method (implicitly)
    3.this() can be used to invoke current class constructor.
    4.this can be passed as an argument in the method call.
    5.this can be passed as argument in the constructor call.
    6.this can be used to return the current class instance from the method.sir mene net pe search kiya to ye sare uses bata rahe hai . muje sirf 1st one hi samaj me aaya aap plz ek aur video banaye.

  • @GunnuGilahari92
    @GunnuGilahari92 Před 2 lety

    Thanks a lot sir
    You have cleared this topic

  • @jordanverma651
    @jordanverma651 Před 2 lety

    baht hi sahi samjhate ho sir aap !

  • @mayank633
    @mayank633 Před 5 lety +1

    Great job

  • @sachingoel7790
    @sachingoel7790 Před 6 lety +2

    Sir, please aap ek object ko kese memory allocate hoti hai or usme kese variable aate hai iska ek diagrammatic video banaye. Jaise apne c mae banaye hue hai. Pls its my humble request.

  • @dakshpatel6519
    @dakshpatel6519 Před 5 lety +1

    Bahot achha kam karate ho sir

  • @SmartProgramming
    @SmartProgramming Před 6 lety +2

    thank you sir, easily explained, nice one

  • @mohiuddinansari9356
    @mohiuddinansari9356 Před 5 lety

    awsm 😊

  • @nargeesansari6337
    @nargeesansari6337 Před 5 lety

    sir everything is good .. well explained .. but please improve audio quality .. thank u

  • @maths_kamlesh1787
    @maths_kamlesh1787 Před 5 lety +1

    4th point agar thoda aur bataa dete bahut badhiya ho jaata
    Your videos I could say are the best

  • @ritiksrivastava3517
    @ritiksrivastava3517 Před 3 lety

    bahut bahut dhanywaad sir..

  • @devanshbeserwal6934
    @devanshbeserwal6934 Před 4 lety

    amazing !!

  • @shaikhfahad4095
    @shaikhfahad4095 Před 4 lety +2

    can anyone explain last point .when I am put this keyword in gf.acceptGift(this) an error accord.

  • @yuvrajmane330
    @yuvrajmane330 Před 6 lety +1

    Sir grand salute for your teaching 👍👌

  • @subhamkumar-dx7wj
    @subhamkumar-dx7wj Před 2 lety

    Sir you deserve more subscribe

  • @tehleelmir4407
    @tehleelmir4407 Před 5 lety +2

    thanks man

  • @utkarshagrawal853
    @utkarshagrawal853 Před 4 lety

    very helpful video sir

  • @vikramk6869
    @vikramk6869 Před 5 lety +8

    Sir mujhe gf. acceptGift(this) ka usage samaj me nhi aaya, aap please isko phir se samjadiye

    • @paulsnehasish5830
      @paulsnehasish5830 Před 3 lety +1

      isko samajh ne ke liye gf hona zaruri hai ! else wo accept nehi karegi !

  • @AnugyaSaxena1111
    @AnugyaSaxena1111 Před 5 lety +2

    ye total java course h?

  • @kk2132
    @kk2132 Před 3 lety

    Thank you sir.

  • @I_m_soul
    @I_m_soul Před 3 lety

    If we write javap Test
    We get default constructor of Test class.
    How to see this variable in instance member method.
    What is the command, I am asking?

  • @Piyushkumar-sl7gc
    @Piyushkumar-sl7gc Před 5 lety

    Sir,i didn't understand if this keyword represent b1 .then how someone can access its private member e.g l,b,h. this.l directly trying to access private member variable .please sir or someone who have better understanding help me.

  • @AnugyaSaxena1111
    @AnugyaSaxena1111 Před 5 lety

    can i depend on this course... is it complete java course...

  • @crazyuniverse3074
    @crazyuniverse3074 Před 3 lety

    giftTaker ke class me jo acceptGift function he, uske pas koi arguments he ki nahi? Please reply...............

  • @varunrajkothakota844
    @varunrajkothakota844 Před 6 lety +1

    Sir,
    In previous chapters you said static members cannot access instance members where as here main is a static function how it can able to access instance members?

    • @shubhammaurya3671
      @shubhammaurya3671 Před 3 lety +1

      this is why you need to make object. try to access instance member without object, you will get error

  • @mukhtaralikhan6478
    @mukhtaralikhan6478 Před 4 lety +1

    can we say that " this" keyword in instance member function is used as a reference type of local variable.?

    • @smashing.things
      @smashing.things Před 3 lety

      It'd be more appropriate if we say that this is a referance variable to an object
      Correct me if I'm wrong :)

  • @ubaidullahmanzoor7024
    @ubaidullahmanzoor7024 Před 5 lety

    What sir you done on last part of program

  • @blazingspirit2153
    @blazingspirit2153 Před 4 lety +2

    12:53 what if u i initialize b1 as static in the main ......can it be accessible in the gift class?
    PS: i am not using this here its a alternate solution assumption

    • @saumyojitdas4212
      @saumyojitdas4212 Před 2 lety +1

      Java code for using 'this'
      // keyword as method parameter
      class Test
      {
      int a;
      int b;

      // Default constructor
      Test()
      {
      a = 10;
      b = 20;
      }

      // Method that receives 'this' keyword as parameter
      void display(Test obj)
      {
      System.out.println("a = " +obj.a + " b = " + obj.b);
      }

      // Method that returns current class instance
      void get()
      {
      display(this);
      }

      public static void main(String[] args)
      {
      Test object = new Test();
      object.get();
      }
      }
      Output:
      a = 10 b = 20
      What is Test obj ?

  • @vijaybaranwal3041
    @vijaybaranwal3041 Před 4 lety

    sir aur bhi use bataye this k aur sir last wala smjh nhi aya
    salute from ghaziabad

  • @simarjitkaur2864
    @simarjitkaur2864 Před 6 lety +1

    you are amazing.... absolutely amazing... 👍

  • @CodeShell89
    @CodeShell89 Před 4 lety

    sir gf.acceptgift me current obj pass krne se value ky pass huyi hogi

  • @annamicaprasad2502
    @annamicaprasad2502 Před 5 lety

    Sir pkease tackle my error.while running the program ,it is showing an error that is "linkage erroe occurred while loading main class HelloWorkd

  • @shivamSingh-hr6xl
    @shivamSingh-hr6xl Před 4 lety

    sir to khel gye.....gifttaker obj Gf....hahahah

  • @mr.ebrahimvworld6425
    @mr.ebrahimvworld6425 Před 6 lety

    thanx sir

  • @bareetsingh
    @bareetsingh Před 4 lety

    Thanx Sir

  • @Rahulkushwaharahul
    @Rahulkushwaharahul Před 6 lety

    Superb sir, all doubts clear

  • @rubalmarkan23
    @rubalmarkan23 Před 5 lety

    pllzz make pratice problems 🙏🙏🙏🙏🙏🙏

  • @Entertainment-sh4ew
    @Entertainment-sh4ew Před 8 lety

    thank you sir, this really helpful for me

  • @VISHALSHARMA-nf5uy
    @VISHALSHARMA-nf5uy Před 4 lety

    Thanks

  • @sagarsehgal4576
    @sagarsehgal4576 Před 7 lety

    DOUBT--
    Sir can we send the object as an argument and do our work without it......like
    b1.sendBox(b1) and int he function defination we can recieve it and use it??????

  • @akshitbansal1983
    @akshitbansal1983 Před 6 lety

    Sir this local variable nhi hota shayad maine aise likha
    class A
    {
    int x=5;
    int y=this.x;
    }
    Ye program chal pda ye to instance variable hai, na ki local variable.

  • @osamanusrat2404
    @osamanusrat2404 Před 6 lety

    sir i cannot understand last example ap please aik aur video bana ke explain kar den

  • @VishalKumar-kr9me
    @VishalKumar-kr9me Před 6 lety +1

    If there are two calling objects. Then which object would be referred by this??

  • @mihirvaghela3479
    @mihirvaghela3479 Před 4 lety +1

    "baap bap hota hai"
    megnificent

  • @RahulKumar-lx2ig
    @RahulKumar-lx2ig Před 5 lety

    Sir g bahut bahut Shukriya...lekin this static method me q ni bnta h wo smjh ni aaya ..Sir g

  • @kopalchoure6433
    @kopalchoure6433 Před 5 lety

    sir this keyword ka 2nd use nhi aaya samjh me....apne toh aachhe se smjhaya hai par me nhi smjh pa rhi hu.....plz help me sir

  • @zaidchesti8533
    @zaidchesti8533 Před 5 lety +1

    package example;
    /**
    *
    * @author Administrator
    */
    class GiftTaker {
    void acceptGift(box aThis) {
    throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    }

  • @saumyojitdas4212
    @saumyojitdas4212 Před 4 lety

    class Test
    {
    int a;
    int b;

    //Default constructor
    Test()
    {
    a = 10;
    b = 20;
    }

    //Method that returns current class instance
    Test get()
    {
    return this;
    }

    void display()
    {
    System.out.println("a = " + a + " b = " + b);
    }

    public static void main(String[] args)
    {
    Test object = new Test();
    object.get().display();
    }
    }
    What is the function of get(),why we are writing like this ,why are we returning this keyword in that function .

  • @krunalkp1032
    @krunalkp1032 Před 6 lety +3

    sir thank u . but I reaquest u to upload one more video related this . plz

  • @deepanshu_bansal
    @deepanshu_bansal Před 6 lety +1

    function acceptGift cannot use instance variables (l,b,h) because they are private.

  • @anshvashisht8519
    @anshvashisht8519 Před rokem +1

    7:30 important

  • @gupt350
    @gupt350 Před 11 měsíci

    sir ji ,your reference of C or C++ creates confusion , as all students don't know C or C__

  • @harshadamane9351
    @harshadamane9351 Před 3 lety

    Main same program copy krti hun apke but muze errors ate hain..jaise not static variable or this.cannot be referenced from static context like that...aur main editor intilige idea use krti hun..

  • @fortunespirit
    @fortunespirit Před 5 lety

    execution?????

  • @ruchashivankar4707
    @ruchashivankar4707 Před 7 lety

    thanks a lot sir..

  • @kiraworld6760
    @kiraworld6760 Před 3 lety +1

    Is there any way to download the ppt on which sir teach's us.?

  • @siddhantsaini8862
    @siddhantsaini8862 Před 6 lety

    Sir second used of this not understood because you saying assume that a class giftTaker ok now you are create object or giftTaker in that place there is not main function how it possible that object come before main function

  • @thakur_185.
    @thakur_185. Před 6 lety

    great job sir

  • @ranveerraj1998
    @ranveerraj1998 Před 6 lety

    sir ye class12 k liye v hai yaa usse high level ka hai..??

  • @nikitabhardwaj6797
    @nikitabhardwaj6797 Před 6 lety

    👍👍gd job.sir

  • @siddhantsaini8862
    @siddhantsaini8862 Před 6 lety +1

    Sir imegin krne m confused ho gya

  • @musaibjeelani
    @musaibjeelani Před 8 lety +2

    thank you sir..

  • @nagashreebs6522
    @nagashreebs6522 Před 6 lety

    If a method needs to pass current object to another method this is used. Please explain it again with another example

  • @adarshsingh-lb3ws
    @adarshsingh-lb3ws Před 2 lety

    why 100+ dislikes....kuch galat bol dia kya sir ne khi pr??plz point out

  • @rohankhanna5812
    @rohankhanna5812 Před 8 lety +1

    Sir can i call u and ask my queries

  • @AshutoshSingh-xo4xu
    @AshutoshSingh-xo4xu Před 7 lety

    in constructor this variable contains whose reference? as no one calls constructor it initiate by itself as soon as object is created.

    • @123shehry
      @123shehry Před 7 lety

      The constructor contains the reference of the caller! We always call the constructor while creating an object.
      For example:
      Car c = new Car();
      The Car() is the constructor and we are calling it from the main. The Car() can be default constructor or self-created constructor.

  • @chandanjoshi9493
    @chandanjoshi9493 Před 7 lety +1

    sir how can u make an object of gifttaker while there is no class of such name......

  • @arththakur8247
    @arththakur8247 Před 3 lety

    GiftTaker wali line nahi samajh me aae vo to class don't chahiya na jb gf. Reference variable h na

  • @debrajmukherjee4127
    @debrajmukherjee4127 Před 3 lety

    Sir this concept samajh nhi aya?

  • @harshilsasapara5591
    @harshilsasapara5591 Před 6 lety

    sir this keyword to use call one to another constructer

  • @ravindersanjay
    @ravindersanjay Před 4 lety

    जावा का ये पहला वीडियो है जो मुझे समझ नहीं आया।

  • @vipinbarman8319
    @vipinbarman8319 Před 8 lety +1

    grt

  • @gauravvanani5581
    @gauravvanani5581 Před 7 lety

    how can i pass another function name in function argument ?(* and it most be return function)

  • @vijaybaranwal3041
    @vijaybaranwal3041 Před 6 lety

    Sir this keywords use krne k advantage kya hai

  • @sheetalsingh2794
    @sheetalsingh2794 Před 7 lety

    *DOUBT*
    sir , this ko function me bhi paas kia jata h...aisa kyu ??? when it is actually present in every funcition !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  • @goudasatyanarayana8721

    Sir,iam not getting this pointer plz explain it too detail

  • @swapnilmishra697
    @swapnilmishra697 Před 6 lety

    sir apan gf. acceptgift(b1) se kyun nahi Kar sakte

  • @zaidchesti8533
    @zaidchesti8533 Před 5 lety

    sir,where is the output....it does not give any output

  • @bijeyta1028
    @bijeyta1028 Před 3 lety

    Kindly make it easy... your way of understanding is complex

  • @ashishbohara4854
    @ashishbohara4854 Před 10 měsíci

    2023

  • @dharmender1975
    @dharmender1975 Před 6 lety

    if we have two method in class with different name which method is used for this keyword class A{
    void m(){System.out.println("hello m");}
    void n(){
    System.out.println("hello n");
    //m();//same as this.m()
    this.m();
    }
    }
    class TestThis4{
    public static void main(String args[]){
    A a=new A();
    a.n();
    }}

  • @alihaidermafiadon7790
    @alihaidermafiadon7790 Před 7 lety

    package asahe;
    class parent
    {
    parent()
    {
    System.out.println("A");
    }
    }
    class child extends parent
    {
    child() /*sir agar mujha phala child wala constructer chalana ha
    to mujha this keyword ka istamal karna para ga lakin
    ma this ka kasa or kaha likho ga */
    {
    System.out.println(" B");
    }
    }
    public class Asahe
    {
    public static void main(String[] args){
    child s1 = new child();
    }}

    • @alihaidermafiadon7790
      @alihaidermafiadon7790 Před 7 lety

      abhe is ka output A araha ha
      B

    • @ketulpatel1422
      @ketulpatel1422 Před 5 lety

      A or B dono ayenge

    • @ketulpatel1422
      @ketulpatel1422 Před 5 lety

      Tum jeisa kahena chahate ho vaisa ho hi nahi sakata kyuki this keyword tabhi work hoga jab name same hoge but agar constructer ki bat kare to do class k constructer ka name kabhi same hoga hi nahi so this ka use nahi kar sakate ham

  • @sheetalsingh2794
    @sheetalsingh2794 Před 7 lety

    sir,,,, aap function parameter variables ko local variable kyu bol rahe hain...????????
    one of the teacher told me that ,,, local variable aur jo function k parameter variable hain...wo different hain !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    • @123shehry
      @123shehry Před 7 lety

      Function ky parameters local variables hoty hain!
      Function chalnay ky baad destroy hojaty hain.

    • @hemantkumar-zh1bo
      @hemantkumar-zh1bo Před 7 lety

      because local variable is always declared in method..

  • @tehleelmir4407
    @tehleelmir4407 Před 5 lety +2

    this guy is using java tha complete reference book....with same example in the book...which is in front of me now . .

    • @CutieJunieFreak
      @CutieJunieFreak Před 5 lety

      its 3 years old video

    • @nargeesansari6337
      @nargeesansari6337 Před 5 lety +1

      agar hame book se he samajh aa jata to video dekhne q aate .. zahir se baat hai sapne me to java k concept ayenge nhi .. teacher to book se he padhaega easy way me taki hame samjh aa sake..

  • @nksharma4728
    @nksharma4728 Před 6 lety

    sir this keyword ki jrurat Q pdi??

  • @zaidchesti8533
    @zaidchesti8533 Před 5 lety

    and many wrong concepts are there in private and for gift taker you have to make seperate class which i send it below and you didnt wrote void display function and printed the values....i think sir you need some more teaching skills..u dont hv better understanding about java

  • @zaidchesti8533
    @zaidchesti8533 Před 5 lety

    this is the wrong program...it does not printing any value...just wasted my tym