Professional Documents
Culture Documents
* ;
public class I0
static String fileName =
("names.txt") ;
static InputStreamReader isr =
new InputStreamReader(System.in) ;
static BufferedReader stdin = new BufferedReader (isr) s
public static void main(String[ ] args) {
try
FileWriter fw = new FileWriter (fileName)
BufferedWriter bW = new Bufferedwriter (fw)
Printwriter outFile = new PrintWriter(bw)
outFile.close)5
catch(IOException e)
System.err.println(e)
import java.io.*
public class BinaryOutput
static String fileName =
"stu.dat"
static InputStreamReader isr
static BufferedReader stdin
=
new
InputStreamReader
(System.in)
new
BufferedReader (isr) ;
=
dw.writeInt(rno);
dw.writeFloat (marks) ;
dw.close( )
fw.close( )
catch (IOException e)
System.err.println(e) ;
import java.io.*
import java.util.* S
class StringProcessing
static InputStreamReader input =new InputStreamReader (System. in);
statie BufferedReader keyboardInput new
= BufferedReader(input);
public static void main(String[ ] args) throws IOException
1/ Get a string
System.out.printin("Input a string") ;
String data keyboardInput.readLine(O;
=
System.out.println("\n") ;