Powered by Blogger.

1). Introduction to Streams

>> Friday, April 22, 2011

A Stream represents flow of data mainly streams are used to move the data from input device to output device,or a file or file to output device or file to file.

When ever data need to be transferred then a user need to have the address of the source and the address of the destination. To get the address of the source or destination , a user can make use of some of the Stream classes.

BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

InputStreamReader Class will return the address of the standard input device and this class takes an argument as System.in

System is a class which contains a static variable in which represents the standard input device like keyboard.

BufferedReader class Object expects the object of InputStreamReader class as an argument which contains the address of the input device.

Related Posts Plugin for WordPress, Blogger...
© javabynataraj.blogspot.com from 2009 - 2014. All rights reserved.