Java/ J2EE, Oracle Adf Blog
Thursday, 12 February 2015
this keyword can be passed as an argument in the method.
class
S2{
void
m(S2 obj){
System.out.println(
"method is invoked"
);
}
void
p(){
m(
this
);
}
public
static
void
main(String args[]){
S2 s1 =
new
S2();
s1.p();
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment