Ver Mensaje Individual
  #2 (permalink)  
Antiguo 13/11/2014, 01:59
Avatar de Profesor_Falken
Profesor_Falken
 
Fecha de Ingreso: agosto-2014
Ubicación: Mountain View
Mensajes: 1.323
Antigüedad: 9 años, 8 meses
Puntos: 182
Respuesta: Variable booleanas

Buenas,

Código Java:
Ver original
  1. //Tiene espacio en blanco?
  2. boolean val1 = s1.indexOf(" ") != -1
  3.  
  4. //Son iguales?
  5. boolean val2 = s1.equals(s2);

Un saludo
__________________
If to err is human, then programmers are the most human of us