Untitled
unknown
plain_text
5 months ago
524 B
43
Indexable
public class SessionManager { private static SessionManager instance; private User currentUser; private SessionManager() { // Private constructor to prevent instantiation } public static SessionManager getInstance() { if (instance == null) { instance = new SessionManager(); } return instance; } public User getCurrentUser() { return currentUser; } public void setCurrentUser(User user) { this.currentUser = user; } }
Editor is loading...
Leave a Comment