-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
below code in a cell is not working:
class Animal {
public void act(List<? extends Animal> list) {
for (Animal animal : list) {
animal.eat();
}
}
public void aboutShepherdDog(List<? super ShepherdDog> list) {
System.out.println("About shepherdDog");
}
public void eat() {
System.out.println("Eating");
}
}
class Dog extends Animal {}
class Cat extends Animal {}
class ShepherdDog extends Dog {}
when running in a cell, output is :
| class Animal {
| public void act(List<? extends Animal> list) {
| for (Animal animal : list) {
| animal.eat();
| }
| }
|
| public void aboutShepherdDog(List<? super ShepherdDog> list) {
| System.out.println("About shepherdDog");
| }
|
| public void eat() {
| System.out.println("Eating");
| }
| }
Unresolved dependencies:
- class ShepherdDog
but this code is OK for jshell.
kernel version: the the latest jjava-1.0-a4-kernelspec.zip was installed.
Metadata
Metadata
Assignees
Labels
No labels