1
我有命名的問題下面的情況接口作爲方法的參數
{...}
X.a;
a.addListener(new ListenerForX(){
// some interface methods
});
{...}
這是一樣的:
{...}
X.a;
a.addListener(new XListener());
{...}
private class XListener implements ListenerForX{
//some methods
}
怎麼叫?