how to use this key word in java programming?

Answer Posted / kalai

it can be used to call same class constructor.
it refers current object.
example
public class sample{
int k,l;
sample(int k,int l)
{
this.k = k;
this.l = l;
}
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

In the below example, how many string objects are created?

784


Why java is said to be pass-by-value ?

800


Explain different types of thread priorities ?

859


What is instance example?

723


What is the full form of jpeg?

733


Is java ee a framework?

732


What is singletonlist in java?

716


What is meant by class?

774


What are internal and external variables?

732


Can we sort array in java?

724


Can private class be inherited in java?

804


What is the purpose of sizeof operator?

757


What is time complexity java?

777


Are arrays primitive data types?

855


How to read and write image from a file ?

806