java basic syntax (operator)

 

If the modulo is a negative number, the modulo sign can be ignored, for example: 5%-2 = 1

 

For /, there is a difference between integer division and decimal division. The division between integers is performed, and the integer is retained to remove the remainder.

 

+ In addition to the string addition function, it can also convert non-strings to strings

System.out.println("5+5="+5+5);
System.out.println('*' + '\t' +'*');
System.out.println("*" + '\t' +'*');

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325475158&siteId=291194637