Teacher zapp

Different methods for different types

  • 8
  • Locked
  • Homework
So, polymorphism. You haven't forgotten about it, have you? Good. Then let's complete the following task: Read data from the console until the word "exit" is entered. For each value (except "exit"), call the print method. The correct print method depends on the value. For example, if the value contains a period, then use the print method for Double. If the value is a number between 0 and 128, then use the method for short.
You can't complete this task, because you're not signed in.
Comments
  • Popular
  • New
  • Old
You must be signed in to leave a comment
This page doesn't have any comments yet