Comment on Tutorial - TCP Server and TCP Client in Java By Ashish Myles



Comment Added by : newbee

Comment Added at : 2015-04-15 13:21:55

Comment on Tutorial : TCP Server and TCP Client in Java By Ashish Myles
hey im a novice in java...so i have to make a connection to another machine and send data using tcp/ip!
How do i get this done?
I tried this:

import java.io.IOException;
import java.net.Socket;
import java.net.InetSocketAddress;
import java.net.SocketAddress;



Socket connection = new Socket(server,AGREED_PORT_NUMBER);
makeRequestToServer(connection);
getReplyFromServer(connection);

connection.close();

But got an error saying TYPED VARIABLE DECLARATION-OBJECT CONSTRUCTOR


View Tutorial



Ask a Question

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. hello,
i have running my bca IIIrd Year &a

View Tutorial          By: Narpat Dewasi at 2013-07-05 10:49:47

2. Its working ,but it overwrite the old one when run
View Tutorial          By: venkat at 2012-09-17 09:38:53

3. Looks like when I uninstall an app it should be un
View Tutorial          By: Danila Piatov at 2011-05-18 12:03:53

4. //Convert numbers to word as per Indian number sys
View Tutorial          By: Abhishek at 2011-09-05 10:42:20

5. @Vipin : vipin u r wrong,,,in reality java does n
View Tutorial          By: Arpit Tyagi at 2010-07-23 04:11:20

6. Hello,

Can you please send me the c

View Tutorial          By: criz at 2007-10-16 21:06:30

7. very nice approach sir....
u make it very e

View Tutorial          By: aamir at 2011-06-15 01:29:22

8. Hello friends can anybody tell me how to assign in
View Tutorial          By: gnvkdramesh at 2010-09-10 04:27:46

9. I have compiled by keeping all the points in mind
View Tutorial          By: Sweety at 2011-03-09 22:29:18

10. a pretty good site for learners
View Tutorial          By: chaitra at 2011-12-15 10:09:14