I am using Mac Big Sur terminal.
I have a .java file. I can compile using: javac DeptQuery.java
where it creates the class file within the same directory. But then when I type
java DeptQuery
to run it, it give the error: "Error: Could not find or load main class DeptQuery"
I also can't open the .java file from the terminal, I can only compile it from there.