Math Class

Find minimum of two numbers using Math.min

Add Comment

  • In your example of min for long arguments, the arguments are really ints, thus Math.min(int,int) is called instead of Math.min(long,long). The following would be correct:
    * To find minimum of two long values, use
    * static long min(long l1, long l2) method of Math class.



Facebook Fans