I was curious as to how many 3 letter .com domain names were still available, so I wrote this program to scan them. It simply loops through each ASCII character code for A-Z, 0-9 and hypens and attempts to retrieve a web page from the server.
It's not very accurate as it only checks whether a web server is present on the domain, and does sometimes take forever, but it demonstrates the use of for loops, if statements and checking if a URL exists.
It was written on Linux and in order to save the output, you need to run it on a *nix based system with the command:
java tldscan > somefile.txt
otherwise it will just output the results to the display.
Source: java_tldscan.zip (1.1 KB)