When is it not necessary to invoke the method myMethod using dot notation? When myMethod is private. When myMethod is invoked by a method in the same class as myMethod. When myMethod is public. When myMethod is both private and static. When myMethod is invoked by a method in a different class than myMethod.

Respuesta :

Answer:

When myMethod is invoked by a method in the same class as myMethod.

Explanation:

When you are in a class, it is like a different enviroment and within that class you can call a method without using the dot notation because you are still within the class.

Outside the class and despite the type of method, public, private or static, the dot notation will be required.

Answer:

When myMethod is invoked by a method in a different class than myMethod.

Explanation:

Other classes can invoke the function written in different classes using the dot notation.

ACCESS MORE
ACCESS MORE
ACCESS MORE
ACCESS MORE