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. Of course you can use this in a web application. A
View Tutorial          By: Ramlak at 2008-09-17 08:24:21

2. gr8 tute dude.... ezy n nice..
View Tutorial          By: hErC!! at 2010-04-20 23:52:19

3. your second last example in above code (Character
View Tutorial          By: jyoti at 2011-11-06 17:01:19

4. Good example for vector
View Tutorial          By: mangai at 2011-07-07 09:46:10

5. hello
plz tell me what can i do for sending

View Tutorial          By: mahipal at 2009-05-12 10:30:57

6. it doesn't count for the values like 001 or 02 et
View Tutorial          By: angesh at 2012-02-10 16:15:02

7. Can u tell it can also use for connecting to oracl
View Tutorial          By: Ankur Jain at 2010-08-06 05:31:08

8. Support for serial ports is platform dependent and
View Tutorial          By: Sal at 2009-09-15 15:51:55

9. Muy buen ejemplo, aunque como idea general podr&ia
View Tutorial          By: Ligator at 2013-07-26 05:57:47

10. all of codes of t-C++ ide, it is applicable to use
View Tutorial          By: jonard at 2009-06-05 20:41:39