package ext; class ParentClass { void parent() { System.out.println("БупСркласс"); } } class ChildClass extends ParentClass { void child() { System.out.println("Подкласс"); } } 

Errors appear:

  ChildClass: C:\ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹\ext\ChildClass.java:3: error: cannot find symbol class ChildClass extends ParentClass { ^ symbol: class ParentClass 1 error 
 class Main { public static void main(String[] args) { ChildClass c = new ChildClass(); ParentClass p = new ParentClass(); c.parent(); c.child(); p.parent(); } } 

Main errors:

 C:\ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹\ext\Main.java:5: error: cannot find symbol ChildClass c = new ChildClass(); ^ symbol: class ChildClass location: class Main C:\ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹\ext\Main.java:5: error: cannot find symbol ChildClass c = new ChildClass(); ^ symbol: class ChildClass location: class Main C:\ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹\ext\Main.java:6: error: cannot find symbol ParentClass p = new ParentClass(); ^ symbol: class ParentClass location: class Main C:\ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΡ‹\ext\Main.java:6: error: cannot find symbol ParentClass p = new ParentClass(); ^ symbol: class ParentClass location: class Main 4 errors 
  • one
    you are something to keep back ideone.com/TWlRnO - Alexey Shimansky
  • Here, in my opinion, the problem is in the encoding .. - EmErIx_007
  • I have such errors occur in a notebook, if I save it in UTF-8. I need it in ANSI. - EmErIx_007
  • one
    And where is the public class ? Error due to the fact that there is no public main class. - And

1 answer 1

C: \ programs ... - this is the root of evil. Change the name of the directory in which you store your code, you should not use the Russian alphabet. All only in Latin plus numbers. And not just the folder with the code itself, but the whole path, i.e. all subfolders, starting from the disc itself, should be referred to only in Latin letters and numbers

  • Java has no problems with this, it is not Python. - Sergey Gornostaev