Im writting a program that converts a linear value into a metric value. Ive got the whole program wrote, but I cant get the input to accept values with decimals in them Here is the program: import java.util.*; // For Scanner class public class Metric { //--------------------------------------------------------------------------------------------------------------------------------- // Converts linear values into centimeters, meters, and kilometers based on the linear value entered by the user. // //--------------------------------------------------------------------------------------------------------------------------------- public static void main (String[] args) { Scanner input = new Scanner(System.in); // Prompt user to input a linear value System.out.print("Enter a linear value to convert to metric: "); int value = input.nextInt(); // Converts the linear value to centimeters double centimeters = (value*2.54); System.out.println( value + " inches is " + centimeters + " centimeters "); // Converts the linear value to meters double meters = (value*0.3048); System.out.println( value + " feet is " + meters + " meters "); // Converts the linear value to kilometers double kilometers = (value*1.609344); System.out.println( value + " miles is " + kilometers + " kilometers "); } } The program works good to whole numbers, but I cant get it to accept user input values with decimals. Any help greatly appreciated!

Integers are ... -3, -2, -1, 0, 1, 2, 3, ... See http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html for which datatype you should be using.