As I'm using it, there's no difference. The reasons are mostly historical :P (in some other languages there were performance advantages to doing ++variable, though in Java I don't believe there is...
Type: Posts; User: helloworld922
As I'm using it, there's no difference. The reasons are mostly historical :P (in some other languages there were performance advantages to doing ++variable, though in Java I don't believe there is...
Hmm, are you sorting in ascending order or descending order? Though I guess that doesn't really matter.
The only thing I can see that's wrong is this section:
else if (curr < A.length)
{
...
Arrays are passed via reference rather than by value, so any changes you make to the object inside another method will be reflected in the original array. This is why your professor had you declare...
I think you started getting mixed up a bit here (lack of sleep perhaps?).