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
-~----------~----~----~----~------~----~------~--~---

Reply via email to