Java Java Objects Harnessing the Power of Objects Overload Methods

call

how do yo call a method?

1 Answer

Steven Parker
Steven Parker
201,913 Points

The most common way of calling a method is to name a class instance, and use the membership operator (dot).

For example, if you had a class named Dog with a method named Bark. Then after you had created a Dog instance named "fido" you could call the method on it this way: "fido.Bark();"