This content has been marked as final. Show 1 reply
What you're trying to do doesn't make sense. You're trying to pass nothing to a method, and then have the method turn nothing into something.
This might make sense (although might not be a good design) if Java used pass-by-reference...which it doesn't, as has been discussed endlessly on these forums.
So what can you do?
The best thing would probably be to have the method instantiate the array, and then return it as the return value:
By the way, when you post code (even imaginary code) please wrap it in [code][/code] tags, so it'll be easier to read.
String someStringArray = createAndFillUpArray();