@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof Question)) { return false; } byte t[] = toByteArray(); byte o[] = ((Question)other).toByteArray(); return Arrays.equals(t, o); }
@Override public int hashCode() { return Arrays.hashCode(toByteArray()); }
dos.write(question.toByteArray());