Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2020
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. public class Solution {
  2. public static int min(int a, int b) {
  3. if (a < b) {
  4. return a;
  5. }
  6. else {
  7. return b;
  8. }
  9. }
  10.  
  11. public static void main(String[] args) throws Exception {
  12. System.out.println(min(12, 33));
  13. System.out.println(min(-20, 0));
  14. System.out.println(min(-10, -20));
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement