Created
April 5, 2011 01:14
-
-
Save matismasters/902827 to your computer and use it in GitHub Desktop.
Ejemplo de leer desde el teclado 04-04-2011 CTC-ORT Colonia
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main (String[] args) { | |
System.out.print("Escribi algo: "); | |
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); | |
String teclado = null; | |
try { | |
teclado = br.readLine(); | |
} catch (IOException ioe) { | |
System.out.println("IO error"); | |
System.exit(1); | |
} | |
System.out.println(teclado); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment