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



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. Useful info
View Tutorial          By: valli at 2014-10-27 10:56:58

2. I have a site fully based on php and mysql.The log
View Tutorial          By: titus at 2011-06-14 00:52:30

3. My code runs smoothly. I have taken some steps for
View Tutorial          By: Amit Shrivastava at 2015-01-25 13:48:46

4. wow! thats nice, java program can read and write t
View Tutorial          By: Mutare at 2011-02-25 22:58:09

5. can i apply multidimensional array list the progra
View Tutorial          By: [email protected] at 2009-07-01 05:09:27

6. I wish to implement geocoding and reverse geocodin
View Tutorial          By: Leni at 2010-02-25 13:45:41

7. it is really best site for the information.many ti
View Tutorial          By: panchanan ruata at 2013-05-22 09:36:37

8. Excellent article. Please make the email id of the
View Tutorial          By: Rajita at 2008-03-25 09:31:27

9. sir, i am completed MCA 2011 and i want to learn P
View Tutorial          By: vipin kumar at 2011-09-13 13:00:05

10. The basic structure of simple program is used to l
View Tutorial          By: Muthusasi at 2009-12-17 21:10:01