Here is my problem i hava two classes in two different files
Main.java
---------
//Forget about import
public class Main
{
public Main()
{
Ball smallBall = new Ball()
}
public static void main(String[] args)
{
Main demo = new Main()
}
}
Ball.java
---------
public class Ball
{
public Ball()
{
System.out.println("Ball Class");
}
}
Now this is just an example made as simply as possible
My problem is that when i try to compile Main.java, where in the
constructor Ball object is created compiler gives me an error that
class Ball doesnt exists even though both files are in the same folder.
Please help me, i am working on a large project and have like 10
classes and i cannot dividem into different files because of above issue