Hi there,
I'm tryign to write in a file using this command ,but all I get is the wrong answer although in the command line I get the correct answer in integer e.g 5 or 6 etc..
-not the whole code-
FileOutputStream fos = new FileOutputStream(args[0]);
byte outbuffer=new byte[sizeob];
int counter;
for(int j=0;j<size;j++){
outbuffer[j]=(byte)counter;
System.out.println(" "+ outbuffer[j]);
fos.write(outbuffer[j]);
}
I tried to convert it to character ,but it idn't work either or int ?
does any one knows how to get the right answer?
this is the simple version of my code, the other version is a 2d array that has the value of the counter,
thanks
