Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Solution
- {
- public static int max(int a, int b)
- {
- if (a > b)
- return a;
- else
- return b;
- }
- public static void main(String[] args) throws Exception
- {
- System.out.println( max(10,20) );
- System.out.println( max(-10,-20) );
- System.out.println( max(-100,0) );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement