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!

How to put integer and double values into 1 array??

807606Apr 14 2007 — edited Apr 19 2007
Hey!

I have an array of string, that contains integer and double values. What I want to do is this:
in every step of for loop I examine wheter this string contains integer or double value. Than I parse (Integer.parseInt() or Double.parseDouble()) this value into a new array.

I would like to know, what kind of an array do i have to create, that it will contain both, integer and double values? After i fill this array with int and double values, I am going to sort it - Arrays.sort(Array).
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 17 2007
Added on Apr 14 2007
25 comments
301 views