Hi kidd,

This is how you can use the for loop

public class ArrayIncrementor {
        
        public static void main(String... args){
                
                int[] array = new int[1000];
                int i=0;
                for(i=100;i<200;i++){
                        array[i] = i; //Index Starts from 100
                        System.out.println("array index : "+ i +" array value : 
"+array[i]);
                }
                
        }

}

Thanks,
Ashok A V



On Sat, Aug 8, 2009 at 12:06 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 ?
>
> >
>



-- 
Victory belongs to the most persevering.
 - Napoleon

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