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. Yes, you are right. But JSON is more dangerous tha
View Tutorial          By: Nazmun Sadat Khan at 2009-01-29 21:48:26

2. plz wait for your solution
View Tutorial          By: Desai Rajesh at 2010-03-11 22:00:32

3. sir very well subject is to continuted the java s
View Tutorial          By: G.venkata siva naga kumar at 2009-11-06 01:13:02

4. this site is really very useful.
it provide

View Tutorial          By: ankush bansal at 2009-11-12 08:34:13

5. Thanks!
Please point me to a site which di

View Tutorial          By: TERRY DEGLOW at 2012-01-29 16:04:41

6. Excelent sample, I'm disagree with Anon, the sampl
View Tutorial          By: Gerardo Saldívar at 2009-09-21 15:25:01

7. Thanks so much for the tutorial!! Was extremely us
View Tutorial          By: Debarupa at 2012-05-10 20:23:28

8. Hi
I can able to execute the abov

View Tutorial          By: sruthy at 2010-07-23 03:29:39

9. Hi,
Please give the better example of resou

View Tutorial          By: Keerthi at 2012-01-11 11:28:24

10. @Palla Subramanyam : Your logic is correct, but SO
View Tutorial          By: Roopesh H at 2012-07-27 04:47:48