1.If Object is String it's OK, but impossible for Array, user defined object.
2. Error in Eclipse:
The field OBJECT_CONST cannot be declared static; static fields can only be declared in static or top level types
------
Java Language Specification 3rd Edition, Section 8.1.3:
Inner classes may not declare static members, unless they are compile-time constant fields
Compile-time constant fields : int, long, double, short, ... String, ....
Solution: modify inner class as static class member, or move static variable into top-level class
0 件のコメント:
コメントを投稿