Nachrichtenversenden gefixt/Test-Klassen in eigenes Paket

This commit is contained in:
eichehome 2021-05-14 17:44:48 +02:00
parent 8f2c12dab8
commit 6f39b1ba46
7 changed files with 81 additions and 84 deletions

View file

@ -10,9 +10,9 @@ public class Message implements Serializable {
String username;
String message;
//String date = new SimpleDateFormat("dd-MM-yyyy").format(new Date());
LocalDateTime current = LocalDateTime.now();
DateTimeFormatter formatter = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM);
String date = current.format(formatter);
//LocalDateTime current = LocalDateTime.now();
//DateTimeFormatter formatter = DateTimeFormatter.ofLocalizedDateTime(FormatStyle.MEDIUM);
//String date = current.format(formatter);
public Message(String username, String message) {
this.username = username;
@ -23,8 +23,8 @@ public class Message implements Serializable {
@Override
public String toString() {
return "nickname=" + username
+ ", message=" + message
+ ", time=" + date;
+ ", message=" + message;
//+ ", time=" + date;
}
}