Prove domande capitolo 7
This commit is contained in:
16
src/it/oracle/associate/java8/test/Robot.java
Normal file
16
src/it/oracle/associate/java8/test/Robot.java
Normal file
@@ -0,0 +1,16 @@
|
||||
package it.oracle.associate.java8.test;
|
||||
|
||||
import java.io.EOFException;
|
||||
|
||||
class Machine {
|
||||
public boolean turnOn() throws EOFException { return true; }
|
||||
}
|
||||
|
||||
public class Robot extends Machine {
|
||||
@Override
|
||||
public boolean turnOn() { return false; }
|
||||
public static void main(String[] doesNotCompute) throws Exception {
|
||||
Machine m = new Robot();
|
||||
System.out.println(m.turnOn());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user