I have this snippet of java code. I am a noob in java..
Error :
expected
cfg = new Config;
Code:
Yes, this is the problem:
public class ClosureBuilder {
cfg = new Config();
...
}
At the top level of a class, you can only have:
{ ... })static { ... })This is none of these. If you meant to declare a variable, you should have done so:
private Config cfg = new Config();
If that's not what you intended to do, you should explain your intention.
EDIT: Once you've fixed that, this compiler error seems pretty clear:
class Config is public, should be declared in a file named Config.java
There are two potential fixes for this:
Config non-publicConfig.javaEither should fix that error (potentially revealing more).