[Java] moved up the condition for operators
solved the problems of line endings
delay calculation of characters width