1. 学习
  2. /
  3. 课程
  4. /
  5. Input/Output and Streams in Java

Connected

练习

Implementing method overriding

You will implement method overriding to modify inherited behavior. You will create a parent class Device and a subclass Phone that overrides a method.

说明

100 XP
  • Create Phone class inherited from parent class Device.
  • Override the .turnOn() method.
  • Create a new instance of Phone.
  • Calling the new method to print the message.