Commit 91ccc7ae authored by nargessalehi98's avatar nargessalehi98

over

parent f0781a31
Pipeline #5124 failed with stages
...@@ -18,10 +18,11 @@ public class Client1 { ...@@ -18,10 +18,11 @@ public class Client1 {
System.out.println("Unexpected exception: " + ioe.getMessage()); System.out.println("Unexpected exception: " + ioe.getMessage());
} }
String line = ""; String line = "";
while (!line.equals("over")) { while (!line.contains("over")) {
try { try {
assert console != null; line =" "+ console.readLine();
line = console.readLine(); if(line.contains("over"))
System.exit(0);
streamOut.writeUTF(line); streamOut.writeUTF(line);
streamOut.flush(); streamOut.flush();
} catch (IOException ioe) { } catch (IOException ioe) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment