hi David I think the problem is that age.length is equal to 10 so the condition (a<age.length) is never true.
David Seto escribió:
> This is embarrassing I can’t even figure out to modify the original
> MyJavaArrayProject.
>
> When I ran the program all I get is successful build.
>
> Same thing with debug. My modifications are displayed in green.
>
>
>
>
>
> Just before the *for *loop that prints out the value of each entry of
> the ages[] array, create another *for *loop in which a value of 100 is
> assigned to the first entry of the array, ages[0], 101 to the next entry
> of the array, ages[1], and so on.
>
>
>
> public class JavaArray {
>
> /** Creates a new instance of JavaArray */
> public JavaArray() {
> }
>
> /**
> * @param args the command line arguments
> */
> public static void main(String[] args) {
>
> *// Declare and create int array whose size is 10*
> int[] age=new int[10];
>
> int[] ages = new int[10];
>
>
> *// Display the value of each entry in the array*
>
> * For (int a=100; a<age.length;a++){*
> for( int i=0; i<ages.length; i++ ){
> System.out.print (ages[i] );
>
> System.out.print (age[a]);
>
> }
> }
> }
>
> }
>
>
> --~--~---------~--~----~------------~-------~--~----~
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/javaprogrammingwithpassion?hl=en
> -~----------~----~----~----~------~----~------~--~---
>
begin:vcard fn:Pavel Carrillo Jaramillo n:Carrillo Jaramillo;Pavel email;internet:[email protected] tel;home:57-31-17-92 tel;cell:044-55-34-42-57-53 x-mozilla-html:FALSE version:2.1 end:vcard
signature.asc
Description: OpenPGP digital signature
