Write the code for invoking a method named sendVariable. There is one int argument for this method . Assume that an int variable called x has already been declared and initialized to some value . Use this variable ‘s value as an argument in your method invocation.

Write the code for invoking a method named sendVariable. There is one int argument for this method . Assume that an int variable called x has already been declared and initialized to some value . Use this variable ‘s value as an argument in your method invocation.

LANGUAGE: JAVA

CHALLENGE:

Write the code for invoking a method named sendVariable. There is one int argument for this method .
Assume that an int variable called x has already been declared and initialized to some value . Use this variable ‘s value as an argument in your method invocation.
Assume that sendVariable is defined in the same class that calls it.

SOLUTION:

sendVariable(x);

Add comment