Problem in creation of File with random numbers
hi all,
i have written a function which generates random num,ber and stores in a text file.
public static void main(String[ ] args) {
int count=0;
System.out.println("Generate Files");
Random R=new Random();
File F= new File("C:/e.cartesian");
try{
FileWriter fw=new FileWriter(F);
int c=0;
int rand=200;
int l=0;
for(int i=0;i<3;i++)
{for(int j=0;j<5;j++)
{for(int k=0;k<80;k++)
{
c+=1;
double d=R.nextDouble()*100;
Double D=new Double(d);
int dtoi=D.intValue();
float itof=(dtoi/(float)100.0)+R.nextInt(200)+l;
Float f=new Float(itof);
fw.write(f.toString()+" ");
System.out.println(f.toString());
}
fw.write("\n");
count+=1;
}
l+=200;
System.out.println("Count==>"+count);
}
}catch(IOException e){}
}
}
Problem is , if i run this code with condition k<79 or some other smaller value than 80 it doesnt save any value in text file.

