import java.io.*;
public class First {
public static void main(String[] args) throws IOException{
// TODO Auto-generated method stub
DataInputStream dis = new DataInputStream(System.in);
FileOutputStream fout = new FileOutputStream("test.txt",true);
BufferedOutputStream bout = new BufferedOutputStream(fout,1024);
char ch;
while((ch = (char)dis.read())!='*'){
bout.write(ch);
}
bout.close();
}
}
public class First {
public static void main(String[] args) throws IOException{
// TODO Auto-generated method stub
DataInputStream dis = new DataInputStream(System.in);
FileOutputStream fout = new FileOutputStream("test.txt",true);
BufferedOutputStream bout = new BufferedOutputStream(fout,1024);
char ch;
while((ch = (char)dis.read())!='*'){
bout.write(ch);
}
bout.close();
}
}
output:-
Sr.Performance engineer
Sai Nagendra Bhavani Prasad
Java Profiles
APM Tools
*
Text file contents:-
Sr.Performance engineer
Sai Nagendra Bhavani Prasad
Java Profiles
APM Tools
No comments:
Post a Comment