dcsimg
how to use readLine() to read from command prompt???
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   shikha_aggarwal
Posted On:   Wednesday, August 18, 2004 12:16 AM

I am stuck in my program as how to use readLine()??


this is the function of which class??
pls help me

Re: how to use readLine() to read from command prompt???

Posted By:   Deepak_k  
Posted On:   Wednesday, August 18, 2004 01:22 AM

hai
there are actully 2 ways i know
One is the method in DataInputStream whcich is bit buggy
better use BufferedReader
usage:

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

String obj= r.readLine();

Readers and Writers are to be used when reading characters.
About | Sitemap | Contact