以前我创建类的实例是这样的;
Classname a=new Classname();
OR
Classname a=new Classname(1,2,3);
但以下代码非常令人困惑。
为什么要用括号将其括起来,并包含在方法内部?
为什么要在结尾处加上分号?
LocationResult locationResult = new LocationResult(){
@Override
public void gotLocation(Location location){
}
};