nullpointerException
in
Programming Questions
•
1 year ago
with this code:
- class wavfile{
- String name=null;
- byte[] data=null;
- //constructor
- wavfile(String name){
- this.name=name;
- this.data= loadBytes(this.name);
- }
- //metadata
- void lee_metadatos(){
- println(this.data.length);//<<<<<<<errror nullpointException
- }
- }
- wavfile mywav=new wavfile("piano2.wav");
- mywav.lee_metadatos();
and the error is:
the file "piano2.wav" is missing or inaccesible....
but the file "piano2.wav" there is in the sketch folder!!!
any help me? thanks in advance.
1