Re: writing code for an array
"Keith Teo" <email@example.com> wrote:
>"angel" <firstname.lastname@example.org> wrote:
>>with an array called "fraction" of type float, what would be the code needed
>>to assign the value 1.667 to array element9 and the value to array3.333
>>array element 7.
>Assuming you have an array named fraction of type float, so..
>And that you have a total of 9 elements in your array, so..
>fraction= new float;
>Remember, float also counts as a element, java array starts indexing
>so to assign 1.667 to element 9.. u do this..
>and to assign 3.333 to element 7.. u do this..
>so code fragment is actually as follows..
>float fraction=new float;
>nbls reply to my email if you need clarifications.
thanks so much for the help.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center