answersLogoWhite

0

BufferedReader br = new BufferedReader

- can readline and close Java closes when the program terminates but you should always close the file.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is meaning for BufferedReader in equals new BufferedReader new InputStreamReade System in?

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));This line will create a new BufferedReader object, which reads from System.in (standard input). The InputStreamReader part is used to convert System.in (which is an InputStream) to a Reader object (which can be used by BufferedReader).After creating br, you can read input from the user:String input = br.readLine();The line above will allow the user to type in anything they want, press the button, and have what they typed in stored in input.


What is meaning for BufferedReader br equals new BufferedReader new InputStreamReade System in?

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));This line will create a new BufferedReader object, which reads from System.in (standard input). The InputStreamReader part is used to convert System.in (which is an InputStream) to a Reader object (which can be used by BufferedReader).After creating br, you can read input from the user:String input = br.readLine();The line above will allow the user to type in anything they want, press the button, and have what they typed in stored in input.


What is a BufferedReader?

giyiy iyiy


Example of BufferedReader mothod in java programming?

import java.io.*; class gar { protected static void main()throws IOException { BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); System.out.print("Enter a value: "); int a=Integer.parseInt(in.readLine()); } }


What is BufferedReader in Java Programming?

BufferedReader is a class used to read text from charater-input stream and buffering characters which reads characters, arrays, and new lines. In general, each read request made using "Reader" class, causes a corresponding read request to be made of the underlying character or byte stream. It is therefore advisable to wrap a BufferedReader around any Reader whose read() operations may be costly, such as FileReaders and InputStreamReaders. For example, BufferedReader in = new BufferedReader(new FileReader("foo.in"));


A program using bufferedreader in quadratic equation?

doctor


What is the difference between datainputstream and bufferedreader?

The differences are: The DataInputStream works with the binary data, while the BufferedReader work with character data. All primitive data types can be handled by using the corresponding methods in DataInputStream class, while only string data can be read from BufferedReader class and they need to be parsed into the respective primitives. DataInputStream is a part of filtered streams, while BufferedReader is not. DataInputStream consumes less amount of memory space being it is binary stream, where as BufferedReader consumes more memory space being it is character stream. The data to be handled is limited in DataInputStream, where as the number of characters to be handled has wide scope in BufferedReader.


What is the difference between BufferedReader and InputStreamReader?

InputReader can covert bytes in different encodings to characters. BufferedReader has a back-end reader which speeds up reading if you are only retrieving small parts at a time. BufferedReader can mark a given position, and after already reading the bytes, reset back to the previous position.


What is a BufferedReader in java?

buffered is basically a way of creating an object


What is parseInt in BufferedReader in java?

parseInt() interprets the next available token as an int.


What is IOExeption in BufferedReader in java?

IOException is thrown when a general input output error occurs.


What is bufferedReader in advance java?

BufferedReader Reads text from a character-input stream, buffering characters so as to provide for the efficient reading of characters, arrays, and lines. The buffer size may be specified, or the default size may be used. The default is large enough for most purposes. In general, each read request made of a Reader causes a corresponding read request to be made of the underlying character or byte stream. It is therefore advisable to wrap a BufferedReader around any Reader whose read() operations may be costly, such as FileReaders and InputStreamReaders. For example, BufferedReader in = new BufferedReader(new FileReader("foo.in")); will buffer the input from the specified file. Without buffering, each invocation of read() or readLine() could cause bytes to be read from the file, converted into characters, and then returned, which can be very inefficient. Programs that use DataInputStreams for textual input can be localized by replacing each DataInputStream with an appropriate BufferedReader.