I'm new to Java coding, and I'm confused. I am using VS Code with the Java extension pack on a MacBook (not sure if this is relevant information or not). I wrote this:
package ICS111;
public class hello {
public static void main(String[] args) {
System.out.println("bruh moment");
}
}
To compile/execute, I used the command javac hello.java, which created a class called hello .class in the ICS111 folder. If I ls in my ICS11 folder, it outputs: (base) Kylies-MBP-3:ICS111 kylie$ ls hello.class hello.java
After this, I tried using java hello, but it gives me this error: Error: Could not find or load main class hello Caused by: java.lang.NoClassDefFoundError: ICS111/hello (wrong name: hello)
Any help would be greatly appreciated!