Foros del Web » Programación para mayores de 30 ;) » Java »

System.exit con -1, 1 y 0 cual elegir ?

Estas en el tema de System.exit con -1, 1 y 0 cual elegir ? en el foro de Java en Foros del Web. el System.exit sirve para cerrar la aplicacion. pero usa unos parametros. que diferencia hay entre el 1, -1 y el 0 del System.exit o sea ...
  #1 (permalink)  
Antiguo 03/03/2010, 08:51
 
Fecha de Ingreso: agosto-2008
Mensajes: 587
Antigüedad: 15 años, 8 meses
Puntos: 6
System.exit con -1, 1 y 0 cual elegir ?

el System.exit sirve para cerrar la aplicacion. pero usa unos parametros.
que diferencia hay entre el 1, -1 y el 0 del System.exit o sea cuando se usan con los determinados valores.

ejemplo:
System.exit(0);
System.exit(1);
System.exit(-1);
  #2 (permalink)  
Antiguo 03/03/2010, 10:21
Avatar de elAntonie  
Fecha de Ingreso: febrero-2007
Mensajes: 894
Antigüedad: 17 años, 2 meses
Puntos: 10
Respuesta: System.exit con -1, 1 y 0 cual elegir ?

Wenas

La solucion esta en el API.

Saludos.
__________________
--
NO. Tu problema no es urgente.

CCFVLS
  #3 (permalink)  
Antiguo 03/03/2010, 10:50
 
Fecha de Ingreso: agosto-2008
Mensajes: 587
Antigüedad: 15 años, 8 meses
Puntos: 6
Respuesta: System.exit con -1, 1 y 0 cual elegir ?

Cita:
Iniciado por elAntonie Ver Mensaje
Wenas

La solucion esta en el API.

Saludos.
como es eso, no entendí, me dejaste colgado igual. jejeje.
  #4 (permalink)  
Antiguo 03/03/2010, 10:52
Avatar de elAntonie  
Fecha de Ingreso: febrero-2007
Mensajes: 894
Antigüedad: 17 años, 2 meses
Puntos: 10
Respuesta: System.exit con -1, 1 y 0 cual elegir ?

El api es esto. http://java.sun.com/j2se/1.4.2/docs/api/

Busca la clase system en el frame de la izquierda.
__________________
--
NO. Tu problema no es urgente.

CCFVLS

Etiquetas: elegir
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 05:18.