In your project, you can have as many classes or functions as you want.
However, when you run your project, there can be only one entry point, that is where the execution of the code begins.
Usually, it is called a main function (in languages like C/C++, Java, C#, etc). If all of your classes have a main function, then you need to tell the compiler, which class's main function to use.
Probably an easier option is to have your 4 classes, exercises if you want to call them that and have a 5th class, that is to store the program class with the main function. This main function will then instantiate (call the constructor of) one of your classes (you can edit which one before you run the project).
Below I demonstrate this with one Main and 2 other classes.
Main.java
public class Main
{
public static void main(String[] args)
{
Hello hello = new Hello();
//Error error = new Error();
// Other classes commented out here
}
}Hello.java
public class Hello
{
public Hello()
{
System.out.println("Hello");
}
}Error.java
public class Error
{
public Error()
{
System.out.println("Integral division by zero is not allowed!");
int error = 2 / 0;
}
}