Methods able to return Arrays?
Go to solution
Solved by Nuluvius,
Glad that you sorted it outGot it working
It has to be static because you are accessing it from static contexts.One more question I have is why does the Array need to be static?
No it means quite the opposite - see static and Access Modifiers.Does static not mean that nothing outside of this class has no rights to change something on it or did I missunderstood something.
I'm not sure what it is that you are asking here...And must it be a Array because everything else is static???
Sorry I have been quite brief, usually I expand a little more but I'm about to go to bed
Because you have that array declared at class scope you don't need to pass it into the method in order to access it (just get rid of that first parameter altogether).
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now