Java Integer Operations

Original link: https://www.lifengdi.com/archives/course/java/3908

Java’s integer operations follow four arithmetic rules and can use any nested parentheses. The four arithmetic rules are the same as those of elementary mathematics. For example: // Four arithmetic public class Main { public static void main(String[] args) { int i = (100 + 200) * (99 – 88); // 3300 int n = 7 * (5 + (i – 9)); // 23072 System.out.println(i); System.out.println(n); } } The numerical representation of integers is not only exact, but […]

This article is reproduced from: https://www.lifengdi.com/archives/course/java/3908
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment