Exam 7: User-Defined Methods
Exam 1: An Overview of Computers and Programming Languages50 Questions
Exam 2: Basic Elements of Java50 Questions
Exam 3: Introduction to Objects and Inputoutput50 Questions
Exam 4: Control Structures I: Selection50 Questions
Exam 5: Control Structures II: Repetition50 Questions
Exam 6: Graphical User Interface Gui and Object-Oriented Design OOD50 Questions
Exam 7: User-Defined Methods50 Questions
Exam 8: User-Defined Classes and Adts50 Questions
Exam 9: Arrays50 Questions
Exam 10: Inheritance and Polymorphism50 Questions
Exam 11: Handling Exceptions and Events50 Questions
Exam 12: Advanced Guis and Graphics49 Questions
Exam 13: Recursion50 Questions
Exam 14: Searching and Sorting50 Questions
Select questions type
Two methods are said to have different formal parameter lists if both methods have a different number of formal parameters, or if the data types of the formal parameters are the same.
(True/False)
4.9/5
(47)
Reference variables as parameters allow you to return more than one value from a method.
(True/False)
4.8/5
(36)
Based on the code in the accompanying figure, what would be the output of the following statement? System.out.println(mystery(8,7));
(Multiple Choice)
4.9/5
(27)
To use a predefined method, you must know the code in the body of the method.
(True/False)
4.9/5
(33)
Which of the following is a valid call to the method in the accompanying figure?
(Multiple Choice)
4.9/5
(33)
Given the method heading in the accompanying figure, which of the following does NOT demonstrate method overloading?
(Multiple Choice)
4.7/5
(39)
Which of the following is NOT part of the heading of the method in the accompanying figure?
(Multiple Choice)
4.8/5
(45)
You can use the class String to pass strings as parameters to a method and change the actual parameter.
(True/False)
4.8/5
(39)
Based on the code in the accompanying figure, what would be the output of the following statement? System.out.println(secret(5, 7.0));
(Multiple Choice)
5.0/5
(41)
Given the method heading in the accompanying figure, which of the following would be an incorrect demonstration of method overloading?
(Multiple Choice)
4.7/5
(33)
An actual parameter is a variable or expression listed in a method call.
(True/False)
4.8/5
(36)
Within a method, an identifier used to name a variable in the outer block of the method can be used to name any other variable in an inner block of the method.
(True/False)
4.8/5
(35)
Which of the following statements about strings is NOT true?
(Multiple Choice)
4.9/5
(38)
When a program executes, the first statement to execute is always the first statement in the main method.
(True/False)
4.7/5
(31)
The technique to solve a problem by subdividing into smaller problems is known as divide-and- conquer and ____ design approach.
(Multiple Choice)
4.8/5
(41)
Which of the following statements about the method heading in the accompanying figure is NOT true?
(Multiple Choice)
4.9/5
(34)
Which of the following identifiers seen in the accompanying figure is visible in method first?
(Multiple Choice)
4.9/5
(37)
Showing 21 - 40 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)