written file but java.util.NoSuchElementException: No line found
<p><strong>I write program that takes from file his input as lines</strong></p>

<p><strong>My file has Data as lines in Arabic Language 
when i run my program Exception caught is</strong> "<em>java.util.NoSuchElementException</em>: No line found" </p>

<p><strong>That's Why although file has 793 line ??!</strong></p>

<p>Code :</p>

<pre><code>try{
    String s;
    Scanner name = new Scanner (new File("name.txt"));
    while (name.hasNextLine()){
          s = name.nextLine();
          //Add Name in SQL Database with other data taked by the same method "FROM TXT FILE" and hasn't errors
    }
  }
  catch(Exception e){
    System.out.println(e);
  }
</code></pre>
