How can i add 10000 users in for loop just take time less than 1 minute? : I have java assignment. The tagert is just only build a java app using eclipse IDE to `add.userAccount(String id, String name, String email)` in to a file. Note that i'm done this assignment because it's no difficult. But i have curious about optimization. Put that code into a loops(such as `for(int times = 0, time < 10000;time++) add.userAccount(String id, String name, String email);`) but i takes alot of time( 5 minutes). I use FileIntputStream and FileOutputStream. Is anyone here suggest me the way to optimize me problem???