All Questions
2 questions
2
votes
3
answers
3k
views
Return array pointers vs. populating an array inserted as a parameter?
Which is better? I noticed the latter is used in a lot of C code. People will typically malloc an array, and then pass that as a parameter to a function, which will then populate it. Whereas in Java, ...
2
votes
1
answer
2k
views
Why does Java support brackets behind variables and even behind method signatures? [closed]
Java allows this:
class X{
int i,j[]; // j is an array, i is not
}
and even worse, it allows this:
class X{
int foo(String bar)[][][] // foo actually returns int[][][]
{ return null; }
}...