Java will automatically connect your class files as long as they are within the same directory. In short, just add a new class file, no imports needed. For example, if you wanted a cube class-object, you would have the following two files:
Main.java
public class Main
{
public static void main(String[] args) {
Cube c = new Cube(2); // Example object
System.out.println(c.size);
}
}
Cube.java
public class Cube
{
int size;
public Cube(int size) { // Constructor method
this.size = size;
}
}