我不知道如何使用 hashmap 和 while 循环从我的数据库中检索数据。请帮助我。
我的代码是
    package com.glomindz.mercuri.dao;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.util.HashMap;
    import com.glomindz.mercuri.util.MySingleTon;
          public class UserServicesDAO {
private Connection connection;
public UserServicesDAO() {
    //connection = new MySingleTon().getConnection();
    connection = MySingleTon.getInstance().getConnection();
}
public void get_all_data() {
    HashMap<Integer, String> result = new HashMap<Integer, String>();
    String query = "SELECT * FROM spl_user_master";
    try {
        PreparedStatement stmt = connection.prepareStatement(query);
        boolean execute = stmt.execute();
        System.out.println(execute);
        ResultSet resultSet = stmt.getResultSet();
        System.out.println(resultSet.getMetaData());
    } catch (SQLException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
}
public static void main(String[] args) {
    new UserServicesDAO().get_all_data();
}
 }
代码有什么问题?