Ver Mensaje Individual
  #3 (permalink)  
Antiguo 24/10/2006, 16:30
Avatar de stock
stock
 
Fecha de Ingreso: junio-2004
Ubicación: Monterrey NL
Mensajes: 2.390
Antigüedad: 20 años, 7 meses
Puntos: 53
En el API esta especificado el funcionamiento....

http://java.sun.com/j2se/1.4.2/docs/...lang/Math.html

Cita:
Math.max(double a, double b)
Returns the greater of two double values.

Math.max(float a, float b)
Returns the greater of two float values.

Math.max(int a, int b)
Returns the greater of two int values.

Math.max(long a, long b)
Returns the greater of two long values.
Tomando en cuenta esto, vemos que el metodo max, solo te compara dos numeros, y no un arreglo o coleccion o algo semejante. la forma correcta de uso seria:

Math.max(29,100);

y regresara 100!

have funnnnnnn