Roquen has a great tutorial post here on JGO.
SiVi is an open-source project of mine that uses Ken Perlin’s 3rd version of random noise (known as Simplex Noise). There is not a lot of explanation, but it does have examples of different outputs (including a topo map), and a hands-on interface where you can vary parameters and see what effect they have.
SiVi also has a pretty simple working code example in the “help” area with lots of comments, including some notes on how to make a topo map. You can download a jar and get immediate access to this via the following link. http://hexara.com/SiVi.jar
In the below image (not the greatest terrain example, I’ll admit), is an example of a mapping to a color bar with 256 increments (on the right) to get terrain. The number ranges and colors I choose are arbitrary. You can define your own for game purposes (e.g., 0 to 63 = water, 64 to 127 = forest, etc., and map to graphics used for those topo features, rather than to color gradients.
http://Hexara.com/Images/EarthMap.JPG
More SiVi info & examples, but will eventually expire:
http://www.java-gaming.org/topics/wip-reel/33731/msg/317526/view.html#msg317526
This post also has a link to an interesting slide show by Ken Perlin.
Since the project is open source, you can also sign up on github (http://github.com/philfrei/SiVi) and poke around the code that way.