To determine the first rank you can do as you have described. But for the second, third,... places are little bit different (if A is first, then B has probability to be second p(B|A) := "the second is B given that the first is A", then B has not 10% to be second but a different value to be second and so on for the others members). Take a look at the condition probability (wiki: http://en.wikipedia.org/wiki/Conditional_probability )
this is a "pseudocode" that do the job
Ranking:
begin probability
a = 20%
b = 10%
...
calculate first
recalculate probability given that first is X (e.g. if first is A p(B|A), p(C|A),...)
calculate second (with the new probability, e.g. b = p(B|A), c = p(C|A),..)
recalculate probability given that first is X and second is Y
calculate third
etc..
NOTE: java random (Math.random) generates value between 0 and 0.999999... (e.g. [0, 1[ 0 is included but 1 not)