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. Which one is the inbuilt Abstract class in java
View Tutorial          By: vikas jain at 2013-04-16 07:25:33

2. thats is really too gud... very easy example to un
View Tutorial          By: radhika at 2011-11-27 16:32:25

3. program is very long
View Tutorial          By: ajit kumar at 2012-04-21 03:57:13

4. The one more best way is

public cl

View Tutorial          By: Palla Subramanyam at 2012-01-25 20:18:03

5. i want full of information abt java
View Tutorial          By: sagar at 2010-08-23 06:42:40

6. best site ever.
View Tutorial          By: rehan ahmed at 2008-12-10 02:21:32

7. I need dumps for practice
View Tutorial          By: Sanket barge at 2011-06-17 10:05:16

8. i avinash can i know how ur problem is resolved ,i
View Tutorial          By: santosh at 2011-12-06 10:35:42

9. Being a freshman in blogging, I really appreciate
View Tutorial          By: tyu at 2009-09-03 08:12:32

10. hi , sending of sms is failing. Please help me in
View Tutorial          By: sudhakar at 2009-06-19 09:39:55