Whether Java will correctly perceive this program code on all OS:

int число = 0; String строка = "1"; System.out.println("Результат = " + String.valueOf(число + Integer.parseInt(строка) + 1)); 

Is it possible to call any variable in Russian ??

I just want to make sure that I can compile my Main.java file with this code on any Java machine.

  • @post_zeew, then why did my program compile? - nick
  • You are asking out of idle interest? Or do you want to use it in practice? - post_zeew pm
  • @post_zeew, in practice. - nick
  • It will work, but I still do not advise you, because moveton. - post_zeew

1 answer 1

If the concrete implementation conforms to the official specification, it will be perceived correctly, see the specification:
http://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.8
But for "adult" programming, this is a very, very bad practice. Not all programmers who may have to read your code are required to know Russian. So I would highly not advise getting used to it. Use the Latin alphabet and identifier names based on English words so that the meaning of the program is easily understood by everyone, regardless of nationality.