+ 1
I don't know what's wrong with this code plz help
7 Answers
+ 1
yes, because if client can't connect server it returns "Connection refused".
+ 2
look here
https://code.sololearn.com/c5Dzb0j6yVGi/#java
(if you get only "terminated", try it again)
0
- run server part first
- then run client part from different command line, because .accept() wait and block executing rest of your program. Or do it on another thread.
0
is this possible in solo learn
0
i changed ServerSocket to Socket but it doesn't work
0
zemiak you run server class first and then run client class?
0
Thanks