Untitled
unknown
plain_text
a year ago
524 B
46
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