How to make switch case syntax smaller? : <p>i'm making simple name generator, and it's working like that: I got an array with name values it's 4 elements, and i'm using random class to pick specific name from array, and next i'm using switch case to validate which one is picked and print it to console.</p>

<p>But, it's only 4 element, but what when i'll try to make 100 elements 4example? I've tried to make switch case in for loop to increment everything in one case, but it turns out that case index should be const. Well, is there any other possible way to make switch case more flexible, and smaller?</p>

<p>Here's code for intersed <a href="http://pastebin.com/bbCxLtRq" rel="nofollow">http://pastebin.com/bbCxLtRq</a></p>
