Advertisement
476179

MixedIntegerOperations

Oct 3rd, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. package lessons;
  2.  
  3. public class MixedIntegerOperations
  4. {
  5.  
  6. public static void main(String[] args)
  7. {
  8. short one = 10, two = 20, three;
  9. three = (short)(one + two);
  10. // when evaluating two WHOLE NUMBERS the result will always be an int
  11.  
  12.  
  13.  
  14.  
  15. }
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement