A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java 8 in Action
this week in the
Java in General
how to read int or any input value entered in console using DataInputStream??
Joined: Jul 15, 2008
Jun 24, 2009 02:34:31
Could you please tell me how to read the int or any input value which is entered in console while executing the program, using
suppose System.out.println("Enter the Range:");
dis = new
int range = dis.read();
System.out.println("The range is "+ range);
i think i am doing something wrong here..please suggest me..
Joined: Jun 24, 2009
Jun 25, 2009 08:28:42
for that ?
Joined: Jun 25, 2009
Jun 25, 2009 11:35:09
Hey, I think you need to use readInt() rather than read()
Take a look at the JavaDoc for
's various methods:
I agree. Here's the link:
subject: how to read int or any input value entered in console using DataInputStream??
chat programe, kindly see the code and help me.
Regarding reading a file in a jsp
about DataInputStream class
ArrayList in jsp using JSTL and springs
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014