// TODO add your handling code here:
try
{
Random r = new Random();
//System.out.println("Numbers
are");
File file = new
File("D:/p1.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);
}
}
Why are we taking i <= 100 and also j <=100 ?
ReplyDelete