Fri Jun 08, 2007 12:34 am
Fri Jun 08, 2007 11:08 am
Xline wrote:very cool article
so can we sayed : there is only one implicit parameter(this object) for every class ?
public void setX(int x)
{
this.x=x;
}
Fri Jun 08, 2007 12:21 pm
class A{
B b;
A(){
b= new B();
}
class B{
public String toString() {
return "B";
}
}
void a(){
System.out.println(this);
System.out.println(b);
}
public String toString() {
return "A";
}
public static void main(String[] args){
A a=new A();
a.a();
}
}
Fri Jun 08, 2007 12:45 pm
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.