OutputStreamEg in Java Program
OutputStreamEg in Java Program
class OutputStreamEg
{
public Static void main(String args[]) throws IOException
{
BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
FileOutputStream fos =new FileOutputStream("c:/muni.txt");
byte b[];
System.out.println("Enter content of the life");
String s =br.readLine();
do
{
b=s.getBytes();
fos.write(b);
s=br.readLine();
}
while(!s.equalsignoreCase("Exit"));
fos.close();
}
}
0 coment�rios:
Post a Comment