191k views
5 votes
Write the code for invoking a method named sendObject. There is one argument for this method which is of type Customer. Assume that there is a reference to an object of type Customer, in a variable called John_Doe. Use this reference as your argument. Assume that sendObject is defined in the same class that calls it.

User Daraan
by
5.6k points

1 Answer

4 votes

Answer:

sendObject(John_Doe);

Step-by-step explanation:

The above code has been written in Java.

Since the calling class is the same that declares it, to invoke the method, simply call its name with its argument(s) in a pair parentheses. The name of the method is "sendObject" and its argument is a reference to an object of type Customer saved in a variable called "John_Doe". This can be written as follows:

sendObject(John_Doe);

Hope this helps!

User Dylan Slabbinck
by
4.7k points