2389379
Ano: 2010
Disciplina: TI - Desenvolvimento de Sistemas
Banca: Consulplan
Orgão: COFEN
Disciplina: TI - Desenvolvimento de Sistemas
Banca: Consulplan
Orgão: COFEN
Provas:
Observe o seguinte trecho de código Java:
1. int size = 27;
2. String name = “Fredo”;
3. Dog myDog = new Dog(name, size);
4. x = size – 5;
5. if (x <15) myDog.bark(8);
2. String name = “Fredo”;
3. Dog myDog = new Dog(name, size);
4. x = size – 5;
5. if (x <15) myDog.bark(8);
6. while (x>3) {
7. myDog.play();
8. }
7. myDog.play();
8. }
9. int[] numList = {2,4,6,8};
10. System.out.print(“Hello”);
11. System.out.print(“Dog: “ + name);
12. String num = ”8”;
13. int z = Integer.parseInt(num);
10. System.out.print(“Hello”);
11. System.out.print(“Dog: “ + name);
12. String num = ”8”;
13. int z = Integer.parseInt(num);
14. try {
15. readTheFile(“myFile.txt”);
16. }
17. catch(FileNotFoundException ex) {
18. System.out.print(“File not found.”);
19. }
15. readTheFile(“myFile.txt”);
16. }
17. catch(FileNotFoundException ex) {
18. System.out.print(“File not found.”);
19. }
Qual linha utiliza o comando que converte a variável tipo string em um valor numérico real?