12.07.2015 Views

k19-k11-orientacao-a.. - Departamento de Sistemas e Computação

k19-k11-orientacao-a.. - Departamento de Sistemas e Computação

k19-k11-orientacao-a.. - Departamento de Sistemas e Computação

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

RESPOSTAS 2066 FileOutputStream arquivo2 = new FileOutputStream (" saida . txt ");7 PrintStream printStream = new PrintStream ( arquivo2 );89 while ( scanner . hasNextLine ()) {10 String linha = scanner . nextLine ();11 printStream . println ( linha );12 }13 }14 }Código Java 17.10: ArquivoParaArquivo.javaResposta do Complementar 17.21 public class TecladoParaArquivo {2 public static void main ( String [] args ) throws IOException {3 InputStream teclado = System .in;4 Scanner scanner = new Scanner ( teclado );56 FileOutputStream arquivo = new FileOutputStream (" saida . txt ");7 PrintStream printStream = new PrintStream ( arquivo );89 while ( scanner . hasNextLine ()) {10 String linha = scanner . nextLine ();11 printStream . println ( linha );12 }13 }14 }Código Java 17.11: TecladoParaArquivo.java206 www.<strong>k19</strong>.com.br

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!