fork download
  1. /**
  2.  *
  3.  * NOTE : Class Name should be Main
  4.  *
  5.  **/
  6. import java.io.*;
  7. import java.util.*;
  8. class Main {
  9. public static void main(String[] args) throws InterruptedException {
  10. List<String> inputByLine = new ArrayList<String>();
  11. //int[] arr=new Array(14);
  12. try {
  13. // Get the object of DataInputStream
  14. String line = "";
  15. int i=0;
  16. while ((line = br.readLine()) != null){
  17. inputByLine.add(line.toString());
  18.  
  19. }
  20. int[] arr=new int[7];
  21.  
  22. i=0;
  23. for (String line2 : inputByLine){
  24. System.out.println(line2);
  25. Iterator it=line2.Iterable();
  26.  
  27. while(it.hasNext()){
  28. arr[i]=(int)(it.next());
  29. }
  30. System.out.println(line2);
  31.  
  32. int j=0;
  33. int min=arr[0];
  34. int max=arr[0];
  35. for(j=0;j<7;j++){
  36. if(arr[i]>max){
  37. max=arr[i];
  38. }
  39. if(arr[i]<min){
  40. min=arr[i];
  41. }
  42. }
  43. System.out.println("%d"+max);
  44. System.out.println("%d"+min);
  45. isr.close();
  46. }
  47. }catch (IOException ioe) {
  48. ioe.printStackTrace();
  49. }
  50.  
  51.  
  52. }
  53. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
2
70 72 73 78 79 74 77
72 73 78 70 71 74 77
compilation info
Main.java:27: error: cannot find symbol
               	Iterator it=line2.Iterable();
               	                 ^
  symbol:   method Iterable()
  location: variable line2 of type String
1 error
stdout
Standard output is empty