Question: A method's interface is its a . parameter list b . return type c . identifier d . all of the above The value used

A method's interface is its
a. parameter list
b. return type
c. identifier
d. all of the above
The value used in a method's return
statement must
a. be numeric
b. be a variable
c. match the data type used before the method name in the header
d. two of the above
Which of the following must every method have?
a. a parameter list
b. a header
c. a return value
d. all of the above
Although the terms parameter and argument are closely related, the difference is that argument refers to q,
a. a value in a method call
b. a passed constant
c. a formal parameter
d. a variable that is local to a method
Assume you have written a method with the header void myMethod(num a, string b). Which of the following is a correct method call?
a. myMethod(12)
b. myMethod("Goodbye")
c. myMethod(12, "Hello")
d. It is impossible to tell.
Assume you have written a method with the header num
yourMethod(string name, num code). The method's type is
a. num
b. string
c. num and string
d. void
Assume you have written a method with the header string myMethod(num score, string grade). Also assume you have declared a numeric variable named test. Which of the following is a correct method call?
a. myMethod()
b. myMethod(test)
C. myMethod(test, test)
d. myMethod(test,"A")
Which of the following is true?
a. A program can call one method at most.
b. A method can contain one or more other methods.
c. A program can contain a method that calls another method.
d. All of the above are true.
When you use a variable name in a method call, it as the variable in the method header.
a. can have the same name
b. cannot have the same name
c. must have the same name
d. cannot have the same data type
Which of the following is most closely related to the concept of local?
a. in scope
b. object-oriented
c. program level
d. abstract
A method's interface is its a . parameter list b

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!