0

Hi below is an example.I want to know,what does one mean by,
1.create a new class that extends SuperHeroes.
2.have a non static field named: action.

thank you.

abstract class SuperHeroes {

abstract void perform();

}

class Thor extends SuperHeroes {
void perform() { System.out.println("Snap your neck with his hammer"); }
}

class Ironman extends SuperHeroes {
void perform() { System.out.println("Crushes your bones"); }
}

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by NormR1
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.