first commit
This commit is contained in:
14
Lecture Notes/src/Week2/InheritanceDriver.java
Normal file
14
Lecture Notes/src/Week2/InheritanceDriver.java
Normal file
@@ -0,0 +1,14 @@
|
||||
package Week2;
|
||||
|
||||
import Week2.Animals.Animal;
|
||||
import Week2.Animals.Cat;
|
||||
|
||||
public class InheritanceDriver {
|
||||
public static void main(String[] args) {
|
||||
Animal a = new Animal("Fred");
|
||||
System.out.println(a);
|
||||
|
||||
Cat c = new Cat("Fluffy");
|
||||
System.out.println(c);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user