Advertisement
Guest User

Arithmetic Operators

a guest
Jun 28th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.27 KB | None | 0 0
  1. /**
  2. The operators are the basic math operators: +, -, /, *
  3. */
  4.  
  5.     int number = 10 + 2;
  6.     int otherNumber = number * 7;
  7.  
  8. /**
  9. You can also perform arithmetic while initializing.
  10. */
  11.  
  12.     int number = 10;
  13.     int otherNumber *= number;
  14.     //otherNumber = otherNumber * number
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement