Advertisement
Azazavr

com.javarush.test.level02.lesson08.task02

Nov 9th, 2015
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. public class Solution
  2. {
  3.     public static int max(int a, int b)
  4.     {
  5.             if (a > b)
  6.                 return a;
  7.             else
  8.                 return b;
  9.     }
  10.  
  11.     public static void main(String[] args) throws Exception
  12.     {
  13.         System.out.println( max(10,20) );
  14.         System.out.println( max(-10,-20) );
  15.         System.out.println( max(-100,0) );
  16.     }
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement