我不明白为什么我无法访问我的课程/班级?

时间:2019-09-29 23:19:32

标签: java package java-package

我在名为PointCP2的文件中有一个名为design2的类,我有 package design;在我的课程PointCP2的顶部。在同一个文件中的测试类(PC2Test)中,我的顶部是import design2.*;,但是每次尝试运行该错误时,我都会不断收到此错误?

我该如何解决?

PointCP2Test.java:5: error: package design2 does not exist
import design2.*;
^
PointCP2Test.java:85: error: cannot access PointCP2
  private static PointCP2 getInput() throws IOException
                 ^
  bad class file: ./PointCP2.class
    class file contains wrong class: design2.PointCP2
    Please remove or make sure it appears in the correct subdirectory of the classpath.

0 个答案:

没有答案