I can't read from DB using java netbeans
<p>I have this code and I faced a problem to read information from MySQL database using java netbeans, data type inside database  varchar</p>

<pre><code>import com.mysql.jdbc.Statement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.util.Scanner;

public class NewDataBase {
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        try{
              Connection con = DriverManager.getConnection("jdbc:mysql://localhost/mydb","root", "password");
              Statement stmt = (Statement) con.createStatement();
              System.out.println("Enter name");
              String name =sc.next();
              String SQL = "select * from list where Name ='"+ name + "'";
              ResultSet rs = stmt.executeQuery(SQL);
              System.out.print("Name: " + rs.getNString("Name"));
              System.out.print("Number: " + rs.getNString("Number"));
              // while(rs.next())
              // {
              //   System.out.print("Name: " + rs.getNString("Name"));
              //  System.out.print("Number: " + rs.getNString("Number"));

              //}
        }catch(Exception e){
            System.out.print("Error:" + e.getMessage());
        } 
    }
}
</code></pre>

<hr>

<p>Error:Can not call getNString() when field's charset isn't UTF-8</p>
