Why can't I modify class member variable outside any methods? [duplicate]
问题 This question already has answers here : Syntax error on token(s) “product1. ”VariableDeclaratorId expected after this token (1 answer) syntax error on tokens, variableDeclarator expected instead (3 answers) syntax error on addActionListener (3 answers) I have an error with system.out.print and I don't know why? [closed] (7 answers) Syntax error on token(s), misplaced construct(s) (4 answers) Closed 2 years ago . I have a class with some variables. When I instantiate an object of that class