java - cannot find symbol error using javax.soud.midi -


i trying follow along "head first java" book.

half way in book program "music machine" explain principles along way.

sadly cant figure out how rid of compiling-error:

    musictest1.java:6 error: connot find symbol       sequencer sequencer = new midisystem.getsequencer();                                           ^       symbol:    class getsequencer       location:  class midisystem 1 error 

that code:

import javax.sound.midi.*;  public class musictest1{     public void play(){         try{             sequencer sequencer = new midisystem.getsequencer();             system.out.println("yay made sequencer object");         }catch(midiunavailableexception ex){             system.out.println("failed make sequencer object");         }     }     public static void main(string[] args){         musictest1 mt = new musictest1();         mt.play();     } } 

can problem because in book use java 5.0 , use java 8 on virtual machine, or did make typing error didn't find? thank you!

as m.cekiera commented added wrong new when trying sequencer object midisystem.getsequencer() method.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -