I created a class called DataManager
and within it I called Calendar.getInstance()
, this class is running on a server with exchange of sockets, but every time you change a socket, the date is never updated, it always displays the same date as the date when the class was instantiated the first time. I would have to create a thread only to keep updating the date or have another way to solve?
language: java