There are several Java speed test programs under the tools on http://www.dslreports.com/
However, these aren't always a reliable indicator of speed. If your DSL, WiFi, Cable, dialup, cell phone, Fiber, ISDN or satellite provider gives you web space that is accessible via FTP, use either RBrowser or Fugu to test an upload and download of a 1 MB file into the website. RBrowser is for passive FTP access and can be downloaded from http://www.rbrowser.com/ . Fugu is used for SFTP (secure FTP), and can be downloaded from http://eq.rsug.itd.umich.edu/software/fugu/
Cyberduck is another good FTP software:
Different webpage hosts use different FTP protocols. Ask yours what they use before downloading the FTP program.
If your internet access provider does not have webspace, measure with FTP to a webhost will be dependent on the speed of the connection between your internet service provider and that webhost, and the above FTP test may not give you a true indicator of the speed.
Note, the speed these connections are typically measured in are in bps = bits per second. There are 8 bits in a byte, and 1024 bytes in a kilobyte, and 1024 kilobytes in a MB (Megabyte), and 1024 MB in a Gigabyte.
The larger a file you try to test, the better an indicator you'll get of the speed.
Note, sometimes the internet connection speed can be slowed down because of issues with Domain NameServer registration. Changing your DNS numbers in any router you may have, as well as the network settings software to OpenDNS numbers found on http://www.opendns.org/ may help speed your internet connection.
Proxy services can also affect your speed.
Some other things to note about maximum speeds, which naturally would be split if more than one device shares the network, and the slowest device in the network would bring down all devices to that slow speed or slower:
802.11b = 11 Mbps
802.11g = 33 Mbps
802.11n = 300 Mbps
Gigabit ethernet = 1000 Mbps
802.11ac = 7 Gbps