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. I used two phrases of the security section for the
View Tutorial          By: pabo at 2010-04-05 05:22:24

2. Thanks , really appreciate
View Tutorial          By: Marlen at 2010-11-23 10:50:29

3. Well the code is good but what if students start e
View Tutorial          By: nitin kumar sharma at 2015-07-15 06:58:18

4. Thanks,
But i would like to use an array li

View Tutorial          By: Gustavo at 2011-06-15 21:03:20

5. Thanks
View Tutorial          By: Cecilia at 2012-08-07 05:05:51

6. Impressing answer guys...
View Tutorial          By: Jayeeta Pal at 2011-06-28 03:18:26

7. Another solution to those, who feel that the probl
View Tutorial          By: Zoltán P. Ackermann at 2010-12-09 01:58:51

8. It will be better, if you expalin by examples codi
View Tutorial          By: Parwez at 2012-06-18 08:03:45

9. Thanks.. grt example
Also... If the type ar

View Tutorial          By: Shahid at 2011-12-20 10:26:22

10. Hai Guys..
It’s nice to see your di

View Tutorial          By: Santosh at 2010-09-19 08:17:52