Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

B.java 388B

123456789101112
  1. public class B extends A {
  2. public static void main(String[] args) {
  3. B b = new B();
  4. if (b.getClass().getInterfaces().length>0) {
  5. throw new RuntimeException("B should not implement any interfaces: "+b.getClass().getInterfaces()[0].toString());
  6. }
  7. if (!(b instanceof java.io.Serializable)) {
  8. throw new RuntimeException("B should be serializable! Inherited from A");
  9. }
  10. }
  11. }