That ampersand thing, I'm not sure exactly what you mean, but you don't mean a reference do you? That's C++, not Java. C is procedure oriented. C++ is object oriented.
However, perhaps C also...
Type: Posts; User: javapenguin
That ampersand thing, I'm not sure exactly what you mean, but you don't mean a reference do you? That's C++, not Java. C is procedure oriented. C++ is object oriented.
However, perhaps C also...
It would also work in the main method too.
It would be better there, but I was assuming that the OP had a reason for not having the variable in the main method.
It means that you're calling a non-static variable in a static method.
For starters, try making the variable test be static.