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.