Results 1 to 4 of 4
Thread: Array , Loop ?
- 08-15-2011, 06:49 PM #1
- 08-15-2011, 06:56 PM #2
You'll only be able to assign one of the elements to the variable. The last one assigned will be the value that the variable has. The value of the first one will be replaced by the second one.numbers from vahid[1] to vahid[5] ... and assigned them to a variable..
Are you wanted to sum those elements into the variable? something like this: var += anArray[ix];
Use a for loop with the starting i value = 1 and the ending value = 5.
- 08-16-2011, 11:23 AM #3
Member
- Join Date
- Jul 2011
- Posts
- 14
- Rep Power
- 0
- 08-16-2011, 11:41 AM #4
Similar Threads
-
how can i loop my array swap
By belfast09 in forum New To JavaReplies: 3Last Post: 06-15-2011, 04:35 AM -
Array or for loop? or both?
By kedecr in forum New To JavaReplies: 4Last Post: 03-09-2011, 01:24 PM -
Loop through Array in JSP
By Robert_85 in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 04-25-2010, 09:00 PM -
Finding a the max value of the array using a for loop
By soccer_kid_6 in forum New To JavaReplies: 1Last Post: 04-11-2010, 11:25 PM -
Need another program with and if-else, array, and for loop
By Zebra in forum New To JavaReplies: 2Last Post: 05-05-2008, 01:56 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks