Ver Mensaje Individual
  #10 (permalink)  
Antiguo 31/03/2009, 14:02
Avatar de drac94
drac94
 
Fecha de Ingreso: mayo-2008
Ubicación: México
Mensajes: 383
Antigüedad: 16 años
Puntos: 5
Respuesta: [ayuda] problema con doubles en java

esto dice en la documentacion

compare

public static int compare(double d1, double d2)
Compares the two specified double values. The sign of the integer value returned is the same as that of the integer that would be returned by the call:

new Double(d1).compareTo(new Double(d2))

Parameters:d1 - the first double to compare
d2 - the second double to compare

Returns:
the value 0 if d1 is numerically equal to d2; a value less than 0 if d1 is numerically less than d2; and a value greater than 0 if d1 is numerically greater than d2.

solo cambia el < por un >

Saludos

Última edición por drac94; 31/03/2009 a las 14:10