I'm working on a program that requires a lot of indices for various arrays. I thought, that one of the methods for doing so would be to have an array that holds all of the indices. For example:
int[] indices = {1, 2, 3, 4, 5};
char[] chars = {'a', 'b', 'c', 'd', 'e'};
The result being "a" would be outputted once, "b" twice, etc.
What would be the best way to go about doing this?