Name

java.lang.Math

Synopsis

This class is a much smaller counterpart to the J2SE Math class. Because J2ME does not support floating-point variables, the class only provides six static methods for determining the absolute value of an int or a long, as well as the smaller (minimum) and larger (maximum) of two int or long variables.

public final classMath {
   // static methods
public static int abs(int a);
public static long abs(long a);
public static int max(int a, int b);
public static long max(long a, long b);
public static int min(int a, int b);
public static long min(long a, long b);
}

Get Wireless Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.