Answer Posted / venkat
'this' is used to reffer current class variable
for example
class sample
{
int myvar=10;
void mymethod()
{
int myvar=20;
system.outprintln("The value of myvar is"+myvar)
system.outprintln("The value of myvar is"+this.myvar)
}
}
output :
20,10
| Is This Answer Correct ? | 39 Yes | 15 No |
Post New Answer View All Answers
What is pure oop?
What are objects in oop?
What is oops with example?
What is oops in simple words?
can inline function declare in private part of class?
what is different between oops and c++
Prepare me a program for the animation of train
What is basic concept of oop?
What is ambiguity in inheritance?
Can a varargs method be overloaded?
How to improve object oriented design skills?
What is abstraction in oop with example?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
What do you mean by variable?
Can bst contain duplicates?