Wednesday, 15 July 2009
Is Bufferd Reader Really Useful ? Try it ! ! !
import java.io.*;
Public class Taking input
{
Public static void main(String [] args) throws IOException
{
BufferedReader x = new BufferedReader(new InputStreamReader(System.in));
// String box;
//String box=x.readLine();
Converting x in Integer
int n=Integer.parseInt(x.readLine());
Converting x in Float
float f=Float.parseFloat(x.readLine());
Converting x in Double
double d=Double.parseDouble(x.readLine());
Converting x in Long
long l=Long.parseLong(x.readLine());
Converting x in Byte
byte b=Byte.parseByte(x.readLine());
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment