how to use this key word in java programming?
Answers were Sorted based on User's Feedback
Answer / nagireddy.siddaka
my answer is like this
class A{
int a;
int b;
A(){
this.a=12;
this.b=14;
)
| Is This Answer Correct ? | 17 Yes | 3 No |
Answer / kavitha
class abc
{
.int x,y;
.
.
public void setValue(int a,int b)
{
this.x=a;
this.y=b;
}
| Is This Answer Correct ? | 11 Yes | 4 No |
Answer / ali
this keyword is used to referd the current objects.
It is also used call the same class constructor.
In the set of statements this statement is executed first.
| Is This Answer Correct ? | 8 Yes | 1 No |
Answer / 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 |
Answer / rakesh
Keyword can not be used as identifiers in your programs.
| Is This Answer Correct ? | 5 Yes | 4 No |
How many types of memory areas are allocated by jvm?
What is java objectoutputstream?
What is a layout manager and what are different types of layout managers available in java awt?
What is the difference between Access Modifier and Access specifier?
Is Java a dying language?
Is it compulsory for a try block to be followed by a catch block in java for exception handling?
Can we have multiple classes in single file ?
How to create an instance of a class without using "new" operator? Plz help me out properly.Thank u.
What are other modifiers?
What is appletviewer?
how we can create packages in java?
How do you replace a string in java?