I have connected JAVA application with MySql .When i wrote PreparedStatement ps = null ; then two option for import package was showing .The two suggested package was :com.mysql.jdbc.PreparedStatement; and java.sql.PreparedStatement .And , when i import com.mysql.jdbc.PreparedStatement package they said for casting as shown below .
ps = (PreparedStatement) con.prepareStatement("INSERT INTO Authors(Name) VALUES(?)");
And when i used java.sql.PreparedStatement not need for casting in above sentence .
so, My question is : why two different import package are showing ? and why casting needed for com.mysql.jdbc.PreparedStatement package ?