Question #19862

11-10. What can you tell about the following method?
public void myMethod( )
{
}

Expert's answer

public means that the method is visible and can be called from other objects of other types. Other alternatives are private, protected, package and package-private.

void means that the method has no return value. If the method returned an int you would writeint instead of void.

body of the method is e,pty - this method does nothing
LATEST TUTORIALS
APPROVED BY CLIENTS