I am trying to put my separate Java files in 1 class. It looks like this.
public class oneClass {
class Request {
public double a;
public double b;
public double c;
public Request(double a, double b, double c) {
this.a = a;
this.b = b;
this.c = c;
}
}
public static class Controller {
public static void main(String[] args) {
Request req = new Request(time, 0, 0);
// some code
}
}
}
but I ran into an error
"Exception in thread "main" java.lang.Error: Unresolved compilation problem: No enclosing instance of type oneClass is accessible. Must qualify the allocation with an enclosing instance of type problem2 (e.g. x.new A() where x is an instance of problem2).
What's going on?