公共嵌套类中的静态最终字段
我有这样的代码:
public class Foo {
public class Bar implements Parcelable {
public static final Parcelable.Creator<Type> CREATOR =
new Parcelable.Creator<Type>() {
@Override
....
}
}
}
日食 说:
The field CREATOR cannot be declared static in a non-static inner type, unless
initialized with a constant expression
请告诉我这是什么?我想这是因为我有一个嵌套的类,但我不知道,如何纠正错误。