Comment on Tutorial - Simple Port Scanner application using Java By Syed M Hussain



Comment Added by : Rohit

Comment Added at : 2012-02-07 16:22:52

Comment on Tutorial : Simple Port Scanner application using Java By Syed M Hussain
Small modification.
System.out.println("Port not in use: " + i ); should be INSIDE the catch block. Otherwise, the output is like:

Port not in use: 79
Port in use: 80
Port not in use: 80
Port not in use: 81

Even if a Port is in use, it will print that its not in use.

Modified output

Port not in use: 79
Port in use: 80
Port not in use: 81
Port not in use: 82


View Tutorial



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. javax.comm.NoSuchPortException
at javax.co

View Tutorial          By: Prakash at 2008-04-14 06:22:38

2. Such a nice site for clear and explains the concep
View Tutorial          By: Sandeep at 2011-05-22 06:34:42

3. Can u show how to do text to speech with servlet.
View Tutorial          By: Rotika at 2011-01-23 20:54:40

4. Hi,

I am getting error "Sender

View Tutorial          By: Jose at 2008-05-26 08:17:48

5. it is not working
View Tutorial          By: shaishav at 2013-06-20 08:03:06

6. introduction is very clear i get wat answer i want
View Tutorial          By: kalyan at 2013-07-02 09:23:40

7. In the 2nd example ,during the creation on object
View Tutorial          By: priyanka thakur at 2011-08-29 20:24:16

8. 27: What happens if the producer and the customer
View Tutorial          By: Spender at 2010-07-25 14:42:08

9. To 15:
Sometimes it is useful to return the

View Tutorial          By: Anderson Goulart at 2010-08-24 19:15:14

10. Thanks for the tutorial. I want to create a catalo
View Tutorial          By: Lue at 2012-07-09 07:00:08