import java.io.*;
public class WriteEven 
{
	public static void main (String args[])
	{
		try 
		{
		 	FileOutputStream file = new FileOutputStream ("Even.dat");
			DataOutputStream data = new DataOutputStream (file);
			for (int i=0;i<25;i++)
	 		{
 				data.writeInt (i*2);
	 		}
 			data.close();
	 	}
		catch(IOException e)
 		{
			System.out.println ("Error");
		}
    	}
}

Click here to go back.

Our aim is to provide information to the knowledge seekers. 


comments powered by Disqus




Footer1