How to fix this statement?
System.out.printf(" 1 | %d | %d | %d\n" ,
Simulator.simulate(2, 1, 0.71, 15, 1200),
Simulator.simulate(5, 1, 0.71, 15, 1200),
Simulator.simulate(10, 1, 0.71, 15, 1200)
);
Syntax error on token ".", { expected after this token [. in Simulator.simulate]
Syntax error on token "" 1 | %d | %d | %d\n"", invalid FormalParameterList
The following code creates exactly the same error (and some more)
The method call
System.out.printfis not allowed in the class body. Move it in a method, a constructor or a static initializer: