The goal of these programming exercises is to practise:
- communication with a remote server
- using the
java.net.*
package capabilities
For this assignment, we've provided the starter project above.
Create a program that connects to the Coding Black Females website, then prints its content to the screen line by line.
Whenever possible, use the try-with-resources construct we saw earlier in the course, and ensure to release all resources.
Create a simple program with two classes:
- a
ExerciseServer
class which uses aServerSocket
to listen for connections onlocalhost:4040
, then prints message it receives on the screen. - a
ExerciseClient
class which requests a connection to server, sends a simple text message to the server.
Ensure to release all resources at the end of your program.