It works !

This commit is contained in:
Clément
2025-03-12 14:26:13 +01:00
parent 3eec95e420
commit 2be11ec4a8
5 changed files with 64 additions and 60 deletions

View File

@@ -0,0 +1,24 @@
package client;
public class UsernameSingleton {
private static UsernameSingleton instance;
private String username;
private UsernameSingleton() {
}
public static UsernameSingleton getInstance() {
if (instance == null) {
instance = new UsernameSingleton();
}
return instance;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
}