Jump to content

Core Java Lo Experts ..


Recommended Posts

Posted

[u][color=#000000][font=Arial,]Within an instance method or a constructor, [/font][/color]this[color=#000000][font=Arial,] is a reference to the current object — the object whose method or constructor is being called. You can refer to any member of the current object from within an instance method or a constructor by using this.[/font][/color][/u]



Naku ardaminantha varaku, in a setter method, we say something like
this.name = name;

In my understanding, [b]this.name [/b]referes to the instance variable and [b]name [/b]refers to the argument parameter.
But, the above underlined statement, says that [b]this [/b]is a reference to the current object.
What does it mean to us ? If it is a reference to the current object, what we ll get out of it ?

Please help.
JK

Posted

[quote name='pinky123' timestamp='1380074865' post='1304300503']
calling cherlapalli jailer and inno CITI#H@
[/quote]

meeru ne kada ?

Posted

[quote name='javakid' timestamp='1380074917' post='1304300505']
meeru ne kada ?
[/quote]
nenu java kadhu :D

Posted

this is current object.
this key word ante when you create an instance of a class in the smae class you can refer all variable by this
u can also refer constructors by this
also methods by this. This is for that object in which the sangarshana is going on at that time. This mean current object
Super means super class this object

[img]http://mars.jpl.nasa.gov/msl-raw-images/msss/00402/mcam/0402ML1666003000E1_DXXX-br.jpg[/img]

manm mars lo rayi ni mars rayi antam
Kani mars emantadhi naa rayi or this rayi ani

Posted

[quote name='bujjulu' timestamp='1380075055' post='1304300518']
this is current object.
this key word ante when you create an instance of a class in the smae class you can refer all variable by this
u can also refer constructors by this
also methods by this. This is for that object in which the sangarshana is going on at that time. This mean current object
Super means super class this object

[img]http://mars.jpl.nasa.gov/msl-raw-images/msss/00402/mcam/0402ML1666003000E1_DXXX-br.jpg[/img]

[color=#ff0000][b]manm mars lo rayi ni mars rayi antam
Kani mars emantadhi naa rayi or this rayi ani[/b][/color]
[/quote]

:D S%Hi[size=4] [/size]

Posted

[quote name='bujjulu' timestamp='1380075055' post='1304300518']
this is current object.
this key word ante when you create an instance of a class in the smae class you can refer all variable by this
u can also refer constructors by this
also methods by this. This is for that object in which the sangarshana is going on at that time. This mean current object
Super means super class this object



[b]manm mars lo rayi ni mars rayi antam
Kani mars emantadhi naa rayi or this rayi ani[/b]
[/quote]
matter ento teledu kaaani emanna comparison aaaaa

Posted

[quote name='manmadudhu' timestamp='1380076068' post='1304300585']
matter ento teledu kaaani emanna comparison aaaaa
[/quote]
naa scope Mars meedha ekkuva untadhi so lvie example adhi theesukunna

Posted

eee java lu software lu ante ento peru vintane ekaralaki ekaralu tadipotayi naaaku....naa chem job kanna nenu inkem cheyalenu :3D_Smiles:

Posted

[quote name='bujjulu' timestamp='1380076123' post='1304300591']
naa scope Mars meedha ekkuva untadhi so lvie example adhi theesukunna
[/quote]
oh avuna....aina naa comment....nuvvu comparison baaga echav ani ala anna mayya

Posted

endhuku this ani vadatham thelsa
manaki java lo class owned variables untai vatini static antam
static kani vatini aa class lo variable ni kani , method ni kani, constructor kani, manam this.xyx ano leka this(a,b,c) or this.method ani refer chestham

ante this anedhi object owened when referring its own members

Vere clas lo aithe
A a = new A(a,b,c);
a.xyx
or a.mothod antam

ikkada twist chusara
manam a.construcotr anakudadhu
adhi alread A a = new A() ane tappudu aa constructor call authadhi

katha bagundha?

Posted

a.constructor ani call chey koodadu endukante ... a anede constructor call chestundi.. nuv arguments iste aa specific constructor call chestundi

×
×
  • Create New...