Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package mathematics;
- public class Mathematics {
- public static int maxMethod(int n1, int n2){
- int max;
- if (n1 < n2)
- max = n2;
- else
- max = n1;
- return max;
- }
- public static void main(String[] args) {
- Mathematics m2 = new Mathematics();
- int result = m2.maxMethod(10,5);
- System.out.println(result);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement