Answer Posted / ashokmail
'this' operator is used to denote the current working
object.
EX:
Class student{
public student(){
this.addStudent();
}
public void addStudent(){
// to do code here
}
public static void main(String args[]){
new student();
}
}
'this' in the constructor is used to denote the current
working object student...
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the different access modifiers available in java?
Is string thread safe in java?
What happens if a constructor is declared private?
Can we catch more than one exception in a single catch block?
What is a line break example?
What is exception handling in java?
What is tostring () method?
What will happen if static modifier is removed from the signature of the main method?
If a method is declared as protected, where may the method be accessed in java programming?
How do you clear a method in java?
What is the difference between instanceof and isinstance?
How to implement an arraylist in java?
What are the different types of inner classes?
What is meant by method?
How do you declare a variable?