开发者

illegal start of expression error

开发者 https://www.devze.com 2023-04-09 15:56 出处:网络
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 u
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

精彩评论

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

关注公众号