/java/hello/Main.java /java/hello/Hello.java
~~ When I tried to new a class in Hello.java from Main.java with such a directory structure, I couldn't understand it, but when I javac from the java folder of the parent folder, it compiles. I don't understand the reason-When I looked it up with verbose, it said [source file search path:.], Which made me confused. For this directory structure, we could: It took me half a day to notice this because the source code was correct. ~~
You can look at the comment section, but it seems that the cause was the lack of class files. Therefore, you can execute it by javac Hello.java first.
I passed this, so I will post it as well.
javac hello/Main.java
Recommended Posts