Hello all, I'm using the version 6 of Eclipse JAVA development. The code below is very basic, but I'm getting warnings which is probably preventing me from running the application. Any ideas? Basically what I'm designing is a program which would input the radius and therefore it would display the circumference, area, and diameter.
Just updated the code below..
package java.lang;
import java.util.Scanner;
public class Circle
{
public static void main(String[] args)
{
//create input dialog
Scanner input = new Scanner(System.in);
//initializing variables
int radius = 0, diameter;
double circumference, area;
//creating formulas
diameter = 2*radius;
circumference = Math.PI*diameter;
area = Math.PI*radius*radius;
//creating input/displays
System.out.print("\nThe radius is: ");
radius = input.nextInt();
}
}