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. u can try this out it will satisify u:)
imp

View Tutorial          By: vallabh at 2014-10-04 17:44:18

2. nested for loop
View Tutorial          By: SAJAN at 2011-03-15 12:42:36

3. this is a very good artical about floating &
View Tutorial          By: Gayathri at 2012-10-31 12:19:28

4. i was after a user interactive calendar where they
View Tutorial          By: Harry at 2011-11-17 09:01:07

5. This program is faulty .

Check for

View Tutorial          By: Shrikant Kale at 2014-09-09 07:31:04

6. Your explanation is good and okay but, it will be
View Tutorial          By: Emmanuel at 2009-05-28 02:45:11

7. Hi hardik,

RMS sample program is av

View Tutorial          By: Daniel Malcolm at 2008-03-29 19:46:18

8. the example program is very simple to understand a
View Tutorial          By: Zubilu at 2010-10-06 00:19:13

9. a very rare but useful tutorial. Thanks a bunch!
View Tutorial          By: Dalitso at 2014-02-19 12:07:34

10. Yes, you can use the newer one as follows

View Tutorial          By: John at 2012-08-11 01:40:46