bugs.java.com
Bug ID: JDK-7094245 XMLEncoder completely ignores arrays when...
When run with Java 1.6_21 the code works fine regardless of the access specifier of arr. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - The console should readOverride public String toString() {. return Arrays.toString(arr)