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. Hey thanks for your tutorial.

But i

View Tutorial          By: Matze at 2013-07-19 16:08:46

2. Oh! Emiley, thank you very much! There are two lo
View Tutorial          By: Alexey at 2009-04-09 14:17:31

3. How can I delete the data that I have entered into
View Tutorial          By: selina at 2011-08-15 05:15:45

4. Really nice explanation...
nice to understa

View Tutorial          By: Parth Kansara at 2011-06-21 02:11:52

5. import java.io.*;
import java.util.*;

View Tutorial          By: srikanth at 2014-05-30 06:44:58

6. i cant understand the concept.please mail me the f
View Tutorial          By: nirmal at 2012-12-17 06:53:14

7. Thank you. This was a very annoying problem unti
View Tutorial          By: CBL at 2009-03-02 02:52:00

8. enter no of line: 5 not fix value
out put i

View Tutorial          By: mark at 2013-01-31 14:30:00

9. Hello, I have executed the above code and it works
View Tutorial          By: Sana at 2010-02-01 03:50:18

10. Comment: yes i understood too:D:D perfect and brei
View Tutorial          By: eman at 2009-04-21 23:57:26