Results 1 to 3 of 3
Thread: Quick Array explanation
- 04-22-2012, 03:47 PM #1
Member
- Join Date
- Mar 2012
- Location
- Dublin
- Posts
- 21
- Rep Power
- 0
Quick Array explanation
Hi I found this piece of code in my lecturers notes and would like to know how the output arrises
Java Code:static void incAll(int[] b) { for (int i=0; i<b.length; i++) b[i]++; } ..... int[] c = {5, 7, 9}; incAll(c); System.out.println(c[0] + " " + c[1] + " " + c[2]);
I'm finding it hard to see where the +1 is coming from.
Any info is much appreciated,
Cheers..
- 04-22-2012, 04:02 PM #2
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 785
- Rep Power
- 12
- 04-22-2012, 04:27 PM #3
Member
- Join Date
- Mar 2012
- Location
- Dublin
- Posts
- 21
- Rep Power
- 0
Similar Threads
-
Implementing quick sort on a array of strings.
By syle_q in forum New To JavaReplies: 3Last Post: 03-27-2012, 04:58 AM -
Can someone take a quick look at this array/forloop. java program for me?
By LadyMonsterFace in forum New To JavaReplies: 5Last Post: 11-27-2010, 01:28 AM -
need explanation
By marie in forum New To JavaReplies: 2Last Post: 03-21-2010, 04:35 PM -
Quick Sort explanation.
By hawaiifiver in forum New To JavaReplies: 4Last Post: 03-10-2009, 03:28 AM -
need a little explanation
By cew27 in forum New To JavaReplies: 7Last Post: 12-14-2007, 12:39 AM
Bookmarks