Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

What is the ort order return of getDeclaredFields

skidmarksFeb 3 2011 — edited Feb 9 2011
The Java JDK specifies that there is no sort order of return for getDeclaredField()
The elements in the array returned are not sorted and are not in any particular order.'
But I need to have the return fields ordered in the same order as seen in the class. In fact, the return order appears to be exactly what I need but believing what I read, I've placed artificial restrictions on field names and then sorted the return. Does anyone have any insight as to what Java plans to do with this method?
This post has been answered by tschodt on Feb 3 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 9 2011
Added on Feb 3 2011
9 comments
2,079 views