How to build this Java Collection from a ResultSet
问题 I have data from a ResultSet that contains three fields: DataType, Data, DataValue. I want to build a Java Collection, and next build the JSON encode. This is the output when I try to print: System.out.println(resultSet.getString("DATATYPE") + " --> " + resultSet.getString("DATA") + " --> " + resultSet.getString("DATAVALUE")); Output: Address --> Test --> JHGJHGJKG Address --> City--> Some city Address --> State --> Some state Address --> Downtown --> Some downtown Address --> Telephone -->