收到错误消息“java.lang.Error:Unresolved compilation ...”

时间:2012-10-03 03:58:35

标签: java compiler-errors runtime-error java.util.scanner

以下代码中的错误是什么?我找不到错误。但我收到一条错误消息:

 Exception in thread "main" java.lang.Error: Unresolved compilation problem: at CircleArea.main(CircleArea.java:6)

代码是:

import java.util.Scanner;

public class CircleArea{
   public static void main (String args[])
   {
     Scanner inputFromUser = new Scanner (System.in);
     int radius = inputFromUser.nextInt();

     double Area =Math.PI *radius*radius;

     System.out.println("Area of the circle is : " + Area);
   }     
 }

0 个答案:

没有答案