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
Will I be able to get a picture in D drive to the c++ program? If so, help me out?
What is the types of inheritance?
Why multiple inheritance is not possible?
What is basic concept of oop?
What are objects in oop?
What is encapsulation example?
What is oops in simple words?
What is this pointer in oop?
just right the logic of it 1--> If few people are electing then every time ur candidate should win 2--> arrange books in box, if box carry weight == books weight then take another box..... find the no of box required.
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?
What is encapsulation c#?
write a program that takes input in digits and display the result in words from 1 to 1000
Please send ford technologies placement paper 2 my mail id
What is difference between data abstraction and encapsulation?
What is polymorphism what are the different types of polymorphism?