Hi Artem Petrov,
First of all, a warm welcome to CodeRanch!
Artem Petrov wrote:The method cannot have name 'long' because it is a reserved word in Java (unless one of the letters is not from english alphabet, but it this case it should be mentioned in the description for this code).
You are absolutely spot-on!

You can't use Java keywords as identifiers (for methods, variables, classes,...). Don't forget: Java is case-sensitive, so
long and
lOng are two different names. The first one is not allowed as identifier, the second compiles without any problem.
So the above code snippet should be
Or
intMethod and
longMethod would be fine as well.
As Mushfiq already mentioned, this errata item was already added to the official list (which you can find
here).
Hope it helps!
Kind regards,
Roel