Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1.  
  2. package mathematics;
  3.  
  4.  
  5. public class Mathematics {
  6.  
  7. public static int maxMethod(int n1, int n2){
  8. int max;
  9. if (n1 < n2)
  10. max = n2;
  11. else
  12. max = n1;
  13. return max;
  14. }
  15.  
  16. public static void main(String[] args) {
  17.  
  18.  
  19. Mathematics m2 = new Mathematics();
  20. int result = m2.maxMethod(10,5);
  21. System.out.println(result);
  22. }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement