Let me get this straight, you want 10 sets of 4 radios buttons each but the behaviour you're getting is that of 1 set of 40?
I think the problem is that you've given all 40 radio buttons the same name. That makes them one group of 40. This means that only one of the 40 can be selected.
What you should do is give every set of 4 the same name and each set a different name from the others i.e. you'll have 10 different names for 10 groups of radios buttons with 4 radios buttons in each set sharing the name but with a different id and value.
BTW, this isn't a Java problem, it's HTML basics :)