Javadoc for Class.getFields() say: \"The elements in the array returned are not sorted and are not in any particular order.\"
Class.getFields()
Any hints on how the order act
Create a helper method that returns a sorted list, and use that instead whenever you need the list of fields. Or lookup by name instead of index.