This content has been marked as final. Show 4 replies
Within a class, what's the difference between a prviate method and aThe first is not static, the second is.
private static method?
If it was public or protected, we could still access a static methodI'm not sure what this means. A method - private/public/protected - can
always be accessed, just from different places.
but why would we declare a prviate static method when the methodIt would be suitable for a static method that was only going to be
can not be called by other classes?
accessed from within the class. Note that such a method can be called
from within a "static context" (like main()) while a non static private
method can't be.
Also a method could be considered static on semantic grounds - if it
only does static (class wide) things.