Skip to content

Commit

Permalink
Update Client.java
Browse files Browse the repository at this point in the history
fixed some bugs
  • Loading branch information
AhmedHosniFahmi authored Mar 22, 2023
1 parent 4b8effa commit 2248561
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ public static void main(String[] args) {
int flag = 1;
while(flag == 1) {
System.out.print("Enter a message: ");
String message = scanner.nextLine();
String message = "";
while (message.equals("")) {
message = scanner.nextLine();
}

if (message.equals("!e")) {
out.writeUTF(message);
Expand Down Expand Up @@ -87,7 +90,10 @@ else if (choose == 2) {

while(flag == 1) {
System.out.print("Enter a message: ");
String message = scanner.nextLine();
String message = "";
while (message.equals("")) {
message = scanner.nextLine();
}

if (message.equals("!e")) {
dpSender.setData(message.getBytes());
Expand Down

0 comments on commit 2248561

Please sign in to comment.