首先看下面一段代码:
ArrayList<Person> people = new ArrayList<>();
Class.forName("com.mysql.jdbc.Driver");
Connection connection = null;
Statement statement1 = null;
ResultSet resultSet = null;
Person person = null;
try {
connection = DriverManager.getConnection("jdbc:mysql://116.196.124.159/shischcool", "root", "root");
statement1 = connection.createStatement();
String sql = "select * from student3 ";
resultSet = statement1.executeQuery(sql);
person = new Person();
int anInt = 0;
String str ;
while(resultSet.next())
{
anInt = resultSet.getInt(1);
person.setId(anInt);
anInt = res