Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. import java.io.*;
  2. import java.util.*;
  3.  
  4. public class Teste
  5. {
  6. public static void main(String[] args) throws FileNotFoundException
  7. {
  8. System.out.println("Hello World!");
  9. Scanner s;
  10. String[] vet;
  11. String linha, m5;
  12. int comparacao, i=0;
  13. File[] fs=new File("/sdcard/forex/m5").listFiles();
  14. System.out.println(fs.toString());
  15. for (File a:fs)
  16. {
  17. System.out.println(a.getName());
  18. s = new Scanner(a);
  19. while (s.hasNextLine())
  20. {
  21. linha=s.nextLine();
  22. System.out.println(linha);
  23. vet=linha.split(";");
  24. if(vet.length>2){
  25. m5=vet[1];
  26. comparacao=Integer.parseInt( vet[2] );
  27. Forex.contabiliza(m5,comparacao);
  28. System.out.println(String.valueOf((i*100)/(30000*fs.length)));
  29. }
  30. }
  31. s.close();
  32. }
  33. Forex.imprime();
  34. System.out.println("Concluído");
  35. }
  36.  
  37.  
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement