Try this...

public class JavaArray {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // Declare and create int array whose size is 10
        int[] ages = new int[10];
        int count = 100;

        for( int i=0; i<ages.length; i++ ){
            ages[i] = count++;
        }

        // Display the value of each entry in the array
        for( int i=0; i<ages.length; i++ ){
            System.out.print(  ages[i] );
        }
    }

}


On Aug 8, 6:36 pm, kidd <[email protected]> wrote:
> Hi to all,
>
> I am having difficulties tryin to write a for statement/loop to assign
> each index in the array a value of 100+.
> I just can't figure out the correct syntax can some one please help ?

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