This is what it does:
2, 4,
6, Br> 8,
10
I want it to be horizontal: try 2, 4, 6, 8, 10
{PrintWriter fout = new PrintWriter (new buffed Vaire (new flumerwriter ("numbers.dat"))); For (Inti = start; I <= 100; i = i + 2) {fout.println (I + ","); }
in method () method: i i Then when you call Output () , it will be displayed as a comma separated list. And for screen display while ((output line = fin.readline ())! = Null {{System.out.print (outputline + "");} System.out.println ();
Alternatively, leaving the comma in the file will be left and displayed as
int count = 0; (Output line = fin.lalline ()) = null) {if (count> 0) System.out.print (","); System.out.print (outputline); count ++;} System Out.println ();
Comments
Post a Comment