开发者

illegal start of expression error

public Properties prop = 开发者_开发问答new Properties();

I get an illegal start of expression error when I try this code snippet. I couldnt figure out what was wrong though.


Most probably you have used this construction inside of a method or constructor.

"public" keyword is allowed for classes, class fields, and methods, but is not allowed for local variables.

Solution: remove "public" from your prop declaration.

Properties prop = new Properties();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜