Is this a Bug or not?# Java - 爪哇娇娃
g*y
1 楼
SDK 2.0
The following code:
interface A
{
}
class B
{
public A play(){
class C implements A
{
private C()
{
}
}
return new C();
}
}
when you compile it, how may class file you will get???
3??? no, 4.
A.class, B.class, B$1.class, B$1$C.class. Among those files
B$1.class infact are useless.
Why this will happen?
This is simplely because you
The following code:
interface A
{
}
class B
{
public A play(){
class C implements A
{
private C()
{
}
}
return new C();
}
}
when you compile it, how may class file you will get???
3??? no, 4.
A.class, B.class, B$1.class, B$1$C.class. Among those files
B$1.class infact are useless.
Why this will happen?
This is simplely because you