static void classes
Posted
by ivor
on Stack Overflow
See other posts from Stack Overflow
or by ivor
Published on 2010-04-09T10:27:49Z
Indexed on
2010/04/09
10:33 UTC
Read the original article
Hit count: 397
Hello, I'm tidying up some of my code with the correct scope on some methods and attributes (I have two classes and at the moment I have a number which I just declared as public to get working, but I feel I should look into this and make private where possible, for better practice)
When working in eclipse it's suggested on one method, when i change it private from public, that I can fix it by dropping off the scope so the method just says "static void" instead of public/private static void.
Is this a better scenario to have nothing, rather than private or public - or is the default scope equivelant to public anyway ?
Thanks
© Stack Overflow or respective owner