0
이것은 프로그래밍 수업에서 시작한 것입니다. 유감스럽게도 제 강사가 전혀 도움이되지 않으므로 전문가의 도움을 구하고 있습니다. 최신 JDK 버전을 사용하고 있습니다. 도움을 줄 수있는 사람 덕분입니다.가져 오기 스캐너를 사용할 때 오류가 발생했습니다
import java.util.Scanner; //the error here reads : incorrect package. but im in the correct package
package calculate.a.tip.ricardo.penaloza; // the error here reads: class,interface or enum expected
public class CalculateATipRicardoPenaloza
{
public static void main(String[] args)
{
Scanner input = new Scanner (System.in);
System.out.println("Enter a number for radius");
double radius = input.nextDouble();
double area = radius * radius * 3.14;
System.out.println("The area for the circle of radius" +
radius + "is" + area);
}
}
Error: Could not find or load main class calculate.a.tip.ricardo.penaloza.CalculateATipRicardoPenaloza
Java Result: 1
BUILD SUCCESSFUL (total time: 5 seconds)
이 패키지 선언이 아닙니까? package calculate.a.tip.ricardo.penaloza; – user1066367
@ user1066367 예, 패키지 선언입니다. –
천재 : D 도와 주셔서 감사합니다. – user1066367