RandomAccessFile rowDataFile=new RandomAccessFile("cards.txt","rw"); byte byte1[]=new byte[(int)rowDataFile.length()]; rowDataFile.readFully(byte1,0,(int)rowDataFile.length()); System.out.println(byte1); .... always print: [B@1fc2fb but the "Cards.txt" is indeed have some content! please help me!!!thx
You are trying to print the byte array object instead of printing the contents of the byte array. That's why it is printing the object reference code. Try this instead
Mani
Quaerendo Invenietis
Doe, a deer, a female deer. Ray, a pockeful of sun. Me, a name, I call my tiny ad ...
Gift giving made easy with the permaculture playing cards