First question: I am trying to print out four double values in reverse order so if the user enters "1 2 3 4" I want it to print out "4 3 2 1" Here is my coding.
// User enters 4 float values here
System.out.println("Enter 4 float values");
inputValues2 = input.readLine();
String[] dblValues = inputValues2.split("\\s+");
Second Question: I want to print out the integer portion of a double value. I guess I am trying to convert the double value to an int. I have tried these two different ways and get errors for both of them. Any ideas?? Maybe I should just do some sort of rounding to a whole number??
int dblConvert = dblAverage.intValue(); // One way
int dblConvert = Integer.parseInt(dblAverage); // Second way