This will explain it, I think...
import java.io.*;
class reading
{
public static void main(String args[]) throws IOException
{
float number;
System.out.println("Enter a number");
try
{
InputStreamReader in = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(in);
String a = br.readLine();
number = Float.valueOf(a);
int x = (int)number;
System.out.println("Your input=" + number);
System.out.println("Your input in integer terms is = " + x);
}
catch(Exception e){
}
}
}