I'm new to Java and I was wondering is there any way to get the total values for the area and circumfrence to round to one decimal place? It keeps outputting whole numbers and I don't want that.
package exercises;
import java.util.Scanner;
public class Exercises {
public static void main(String[] args) {
Scanner user_input = new Scanner (System.in);
System.out.println("Enter a value to represent the radius of a circle.");
String radius = user_input.next();
int radiusValue = Integer.parseInt(radius);
int area = (int) (Math.PI * radiusValue * radiusValue);
int circumference = (int) (2 * Math.PI * radiusValue);
System.out.println("The area is: " + area + " and the circumference is: " + circumference);
}
}