package polymorphism.music; 
import static net.mindview.util.Print.*; 
 
class Stringed extends Instrument { 
  public void play(Note n) { 
    print("Stringed.play() " + n); 
  } 

 
class Brass extends Instrument { 
  public void play(Note n) { 
    print("Brass.play() " + n); 
  } 

 
public class Music2 { 
  public static void tune(Wind i) { 
    i.play(Note.MIDDLE_C); 
  } 
  public static void tune(Stringed i) { 
    i.play(Note.MIDDLE_C); 
  } 
  public static void tune(Brass i) { 
    i.play(Note.MIDDLE_C); 
  } 
  public static void main(String[] args) { 
    Wind flute = new Wind(); 
    Stringed violin = new Stringed(); 
    Brass frenchHorn = new Brass(); 
    tune(flute); // No upcasting 
    tune(violin); 
    tune(frenchHorn); 
  } 
} /* Output: 
Wind.play() MIDDLE_C 
Stringed.play() MIDDLE_C 
Brass.play() MIDDLE_C 
*///:~ 
This works, but there’s a major drawback: you must write type-specific methods for each new 
Instrument class you add. This means more programming in the first place, but it also 
means that if you want to add a new method like tune( ) or a new type of Instrument, 
you’ve got a lot of work to do. Add the fact that the compiler won’t give you any error 
messages if you forget to overload one of your methods and the whole process of working 
with types becomes unmanageable
问:最后一句“Add the fact that the compiler won’t give you any error 
messages if you forget to overload one of your methods and the whole process of working 
with types becomes unmanageable”
是什么意思哈,我不太明白这句什么意思,是怎么个“overload”,这是《Thinking in java 》中的一段。