title: reading from a file(whose contents are copied from another file) in java
body: <p>
  i am reading from a text file(a file in which i wrote some sentences) and printing its contents everything was going well until i copied the same sentences from a PDF file, then nothing is printed into the console ,giving me build successful.
  </p>
  
  <p>this is my code:</p>
  
  <pre><code>        File f=new File("input.txt");
          Scanner sc=new Scanner(f);
          while (sc.hasNext())
          {
              String line=sc.nextLine();
              int i=0;
              while ( i&lt; line.length()) 
              {
                  char c=line.charAt(i);
                  System.out.println(c);
                  i++;
              }
          }
          sc.close();
  </code></pre>
  
  <p>the contents of the text file (whether when i write the sentences by myself or copy it from the PDF):</p>
  
  <pre><code>{sample program in TINY language- computes factorial}
  read x;{input an integer}
  if 0&lt;x then {don’t compute if x&lt;=0}
  fact:=1;
  repeat
  fact:=fact*x;
  x:=x-1
  </code></pre>
  
  <p>
  what am i doing wrong and what to do if i wanted to copy sentences from a PDF file into the text file i am reading from</p>