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
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 :)
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
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.
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.
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.
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.
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?
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
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??????
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.
//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 .
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..
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
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.
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(); }}
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(); }}
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
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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
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..
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
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
"GiftTaker" ka obj instance "gf" banana kafi real life example tha....haha
@Roger Clayton so what did you find? her other boyfriends?😜
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 :)
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
Super Complex Concept in Simplest Way!!!! Grt Grt Job!!!
I want to meet you sir just once in my lifetime to take your blessing.
very much supportive contents for new bies like me .....really really thankyou so much 🙏🙏🙏
Thank you Sir for the video. It is really helpful.
Great Explanation Sir🙇♂🙏❤✨
Ur teaching is excellent sir. But plz improve sound of video
Very nicely explained!
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.
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.
javatpoint
Thanks a lot sir
You have cleared this topic
baht hi sahi samjhate ho sir aap !
Great job
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.
Bahot achha kam karate ho sir
thank you sir, easily explained, nice one
awsm 😊
sir everything is good .. well explained .. but please improve audio quality .. thank u
4th point agar thoda aur bataa dete bahut badhiya ho jaata
Your videos I could say are the best
bahut bahut dhanywaad sir..
amazing !!
can anyone explain last point .when I am put this keyword in gf.acceptGift(this) an error accord.
Sir grand salute for your teaching 👍👌
Sir you deserve more subscribe
thanks man
very helpful video sir
Sir mujhe gf. acceptGift(this) ka usage samaj me nhi aaya, aap please isko phir se samjadiye
isko samajh ne ke liye gf hona zaruri hai ! else wo accept nehi karegi !
ye total java course h?
Thank you sir.
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?
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.
can i depend on this course... is it complete java course...
giftTaker ke class me jo acceptGift function he, uske pas koi arguments he ki nahi? Please reply...............
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?
this is why you need to make object. try to access instance member without object, you will get error
can we say that " this" keyword in instance member function is used as a reference type of local variable.?
It'd be more appropriate if we say that this is a referance variable to an object
Correct me if I'm wrong :)
What sir you done on last part of program
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
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 ?
sir aur bhi use bataye this k aur sir last wala smjh nhi aya
salute from ghaziabad
you are amazing.... absolutely amazing... 👍
hi
sir gf.acceptgift me current obj pass krne se value ky pass huyi hogi
Sir pkease tackle my error.while running the program ,it is showing an error that is "linkage erroe occurred while loading main class HelloWorkd
sir to khel gye.....gifttaker obj Gf....hahahah
thanx sir
Thanx Sir
Superb sir, all doubts clear
pllzz make pratice problems 🙏🙏🙏🙏🙏🙏
thank you sir, this really helpful for me
Thanks
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??????
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.
sir i cannot understand last example ap please aik aur video bana ke explain kar den
If there are two calling objects. Then which object would be referred by this??
current one
"baap bap hota hai"
megnificent
Sir g bahut bahut Shukriya...lekin this static method me q ni bnta h wo smjh ni aaya ..Sir g
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
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.
}
}
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 .
sir thank u . but I reaquest u to upload one more video related this . plz
function acceptGift cannot use instance variables (l,b,h) because they are private.
Function of the same class can use private members.
7:30 important
sir ji ,your reference of C or C++ creates confusion , as all students don't know C or C__
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..
copy mat kro, samajh ke kro.
😂😂😂
execution?????
thanks a lot sir..
Is there any way to download the ppt on which sir teach's us.?
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
great job sir
sir ye class12 k liye v hai yaa usse high level ka hai..??
👍👍gd job.sir
Sir imegin krne m confused ho gya
thank you sir..
If a method needs to pass current object to another method this is used. Please explain it again with another example
why 100+ dislikes....kuch galat bol dia kya sir ne khi pr??plz point out
Sir can i call u and ask my queries
in constructor this variable contains whose reference? as no one calls constructor it initiate by itself as soon as object is created.
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.
sir how can u make an object of gifttaker while there is no class of such name......
sir told u to imagine .
GiftTaker wali line nahi samajh me aae vo to class don't chahiya na jb gf. Reference variable h na
Sir this concept samajh nhi aya?
sir this keyword to use call one to another constructer
जावा का ये पहला वीडियो है जो मुझे समझ नहीं आया।
grt
how can i pass another function name in function argument ?(* and it most be return function)
Sir this keywords use krne k advantage kya hai
*DOUBT*
sir , this ko function me bhi paas kia jata h...aisa kyu ??? when it is actually present in every funcition !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Sir,iam not getting this pointer plz explain it too detail
sir apan gf. acceptgift(b1) se kyun nahi Kar sakte
sir,where is the output....it does not give any output
Kindly make it easy... your way of understanding is complex
2023
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();
}}
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();
}}
abhe is ka output A araha ha
B
A or B dono ayenge
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
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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Function ky parameters local variables hoty hain!
Function chalnay ky baad destroy hojaty hain.
because local variable is always declared in method..
this guy is using java tha complete reference book....with same example in the book...which is in front of me now . .
its 3 years old video
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..
sir this keyword ki jrurat Q pdi??
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
this is the wrong program...it does not printing any value...just wasted my tym