- Qn. Write a program to display all name and IP addresses of all network interfaces
Solution:- DisplayNameIP.java
- Application
Qn.:- Create a TCP client/server program in which client sends an integer to the server and the server responds to client by sending square of the number sent by client.
Solution:-
ServerSquare.java
ClientSquare.java
output://
Server is running at 5668
User sent:- 12
squre of 12 is 144
Qn.:- Create a TCP client/server program to accept a line of string input from the client and send it to server. The server checks if the string is Palindrome or not and send result back to the client. Client machine displays the string received from server.
Solution:-
PalindromeServer.java
PalindromeClient.java
Output://
Enter a string to pass in server to check if the string is 'palindrome' or not:-
aha
Server sends:- PALINDROME
Enter a string to pass in server to check if the string is 'palindrome' or not:-
isha
Server sends:- NOT A PALINDROME