现有: class Pencil { public void write (String content){ System.out.println( "Write",+content){ } }class RubberPencil extends Pencil{ public void write (String content){ System.out.println("Rubber Write"+content); } public void erase (String content)}} 执行下列代码的结果是哪项?() Pencil pen=new Pencil(); (( RubberPencil) pen).write( "Hello");
- AWrite Hello
- BRubber Write Hello
- C编译失败
- D运行时抛出异常