Created
March 17, 2014 15:14
-
-
Save mquezada/9601105 to your computer and use it in GitHub Desktop.
This file contains 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
import java.io.IOException; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
class IO_1 { | |
static public void main(String[] args) throws IOException { | |
BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); | |
String line; | |
StringBuilder sb = new StringBuilder(); | |
while((line = bf.readLine()) != null) { // una version mas corta de lo mismo | |
sb.append(line + "\n"); // guardamos cada linea en el StringBuilder, mas un salto de linea | |
} | |
System.out.println(sb.toString()); // imprimimos todo junto al final | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment