English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Tell me the range of different input commands in Java like int,double,short,long,float,double,byte,char,boolean etc. & explain me in detail.

2006-09-06 22:40:41 · 5 answers · asked by djdivyansh 1 in Computers & Internet Programming & Design

5 answers

http://www.pekiyi.150m.com/java.html

2006-09-06 23:06:47 · answer #1 · answered by iyiogrenci 6 · 0 0

do no longer use different BufferedReader and InputStreamReader gadgets. As you word, it is wasteful and it clutters the source, yet much extra importantly it could reason this methodology to misbehave. (If extra beneficial than one line of enter is obtainable -- working example while enter has been redirected from a record or pipe -- one BufferedReader would internally assemble many lines of enter, which would be lost once you shut that occasion.) particularly create and use only one occasion of BufferedReader (and InputStreamReader) and get carry of each and all the enter from that occasion. Create the BufferedReader earlier the whilst() loop and don't close it till this methodology has examine each and all the enter it needs. BTW, casting a String to an int won't do what you have chose. To get the 'int' represented by a String, use the parseInt() approach from the Integer classification. In a intense application you may elect to accomplish a little extra checking on the result, to make certain that it became into an appropriate value (no longer detrimental, no longer 0, etc).

2016-12-12 04:06:20 · answer #2 · answered by kull 4 · 0 0

u need some basics of programming...the types u r asking are data types, not input commands....
please go thru some basic books on programming. even basic java books will help.
for java u can try Complete Reference Java by Schmidt. its a good book.
else there are lots of tutorials available online...they'll be able to help.
there is a site www.javaalmanac.com...which gives u sample programs...but u'll be able to use it only after u get ur basics right.

2006-09-06 23:43:01 · answer #3 · answered by smilepls 3 · 0 0

long 64 –9,223,372,036,854,775,808 to ,223,372,036,854,775,807
int 32 –2,147,483,648 to 2,147,483,647
short 16 –32,768 to 32,767
byte 8 –128 to 127
double 64 4.9e–324 to 1.8e+308
float 32 1.4e−045 to 3.4e+038

2006-09-07 00:07:55 · answer #4 · answered by praveen s 1 · 1 0

Try this web page.

2006-09-06 23:19:10 · answer #5 · answered by AnalProgrammer 7 · 0 0

fedest.com, questions and answers