M
M
MeeLeSh2020-10-25 19:02:47
Java
MeeLeSh, 2020-10-25 19:02:47

Can't import?

package Java;
import Java.A;

public class TextDocument {
  public static void main(String[] args) {
    System.out.println("Hello, World");
    A AAA = new A();
    AAA.doubleA();
  }
}


package Java;

public class A {
  public void doubleA() {
    System.out.println("...");
  }
}


I'm trying to import Class A, which is in the folder along with the Class TextDocument (both are in the Java folder, the full root is D:\programming\Projects\Java), but it doesn't work.
I'm trying to compile the TextDocument.java file and I'm getting the following errors:

5f95a16ed0bf0347986547.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Roo, 2020-10-25
@MeeLeSh

Try:
javac A.java TextDocument.java

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question