In java a data structure is a particular way of organizing


In Java, a data structure is a particular way of organizing data so that it can be used efficiently. An array is a Java data structure. Define an Array and why you would use one. Provide an example that is not from the text.

What is the output of the following array code fragment:

int[] egArray = { 2, 4, 6, 8, 10, 1, 3, 5, 7, 9 };

for ( int index= 0 ; index < 5 ; index++ )

System.out.print( egArray[ index ] + " " );

a. 2 4 6 8

b. 2 4 6 8 10

c. 2 4 6 8 10 1

d. 2 4 6 8 10 1 3 5 7 9

Solution Preview :

Prepared by a verified Expert
Business Management: In java a data structure is a particular way of organizing
Reference No:- TGS02809451

Now Priced at $10 (50% Discount)

Recommended (99%)

Rated (4.3/5)