try
{
Random r = new Random();
//System.out.println("Numbers
are");
File file = new
File("D:/p2.csv");
FileWriter writer = new FileWriter(file);
System.out.println("start");
for(int i=1;i<=100;i++)
{
for(int j=1;j<=100;j++)
{
int value;
value=r.nextInt(10000);
writer.append(Integer.toString(value)+" ");
}
writer.append('\n');
writer.flush();
}
writer.close();
System.out.println("end");
}
catch(Exception e)
{
System.out.println(e);
}
}
No comments:
Post a Comment