Syntax error, insert “VariableDeclarators” to complete LocalVariableDeclaration occurs
To make the Syntax error disappear and to assign a value to distanceTraveledmodify the method public Water update(int time) as follows: Maybe you should read a bit about Java and doing some tutorials, because this is very basic stuff (at least if I’m not getting you wrong).