Java - Presione enter para finalizar el programa

 
Vista:

Presione enter para finalizar el programa

Publicado por Wind (3 intervenciones) el 26/08/2014 20:51:50
Saludos cordiales.

¿Qué lineas adicionales debo agregar, de tal forma que el programa finalice cuando el usuario presiona Enter?

Código:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
 
package hola.mundo;
 
/**
 *
 * @author Wind
 */
public class HolaMundo {
 
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        System.out.println("Hola mundo");
 
// TODO code application logic here
    }
 
}
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder