Statement st=(Statement) sqlcon.createStatement();
ResultSet p=st.executeQuery("SELECT * FROM `chat`.`online_users`");
I have got the data from the database through the object of ResultSet but when i am sending it to the client through sockets it is giving an error. It is not serializable. How to send data and receive data retrieved through ResultSet across socket?
Read the data from the
ResultSet, push it in aListthen send yourList. All the implementations likeArrayListalready implementSerializableinterface, you can read this answer to know more about List Serialization.