Exam 5: Methods
Exam 1: Introduction to Computers and Java53 Questions
Exam 2: Java Fundamentals52 Questions
Exam 3: Decision Structures58 Questions
Exam 4: Loops and Files56 Questions
Exam 5: Methods56 Questions
Exam 6: A First Look at Classes58 Questions
Exam 7: Arrays and the Arraylist Class63 Questions
Exam 8: A Second Look at Classes and Objects52 Questions
Exam 9: Text Processing and More About Wrapper Classes62 Questions
Exam 10: Inheritance64 Questions
Exam 11: Exceptions and Advanced File Io59 Questions
Exam 12: Java-Fx: Gui Programming and Basic Controls42 Questions
Exam 13: Java-Fx: Advanced Controls40 Questions
Exam 14: Java-Fx: Graphics, Effects, and Media40 Questions
Exam 15: Recursion23 Questions
Exam 16: Databases40 Questions
Select questions type
Select all that apply. Any method that calls a method with a throws clause in its header must __________.
(Multiple Choice)
4.8/5
(31)
A special variable that holds a value being passed into a method is called a(n) __________.
(Multiple Choice)
4.8/5
(44)
When you pass an argument to a method you should be sure that the argument's type is compatible with __________.
(Multiple Choice)
4.8/5
(40)
A value-returning method can return a reference to a non-primitive type.
(True/False)
4.9/5
(32)
A __________ type of method performs a task and then terminates.
(Multiple Choice)
4.9/5
(39)
If method A calls method B, and method B calls method C, and method C calls method D, when method D finishes, what happens?
(Multiple Choice)
4.8/5
(40)
Given the following method, which of these method calls is valid?
public static void showProduct (int num1, double num2)
{
Int product;
Product = num1 * (int)num2;
System.out.println("The product is " + product);
}
(Multiple Choice)
4.8/5
(25)
Two general categories of methods are void methods and value-returning methods.
(True/False)
4.9/5
(32)
Only constants and variables may be passed as arguments to methods.
(True/False)
4.9/5
(46)
A parameter variable's scope is the method in which the parameter is declared.
(True/False)
4.8/5
(30)
In the method header, the method modifier public means that the method belongs to the class, not a specific object.
(True/False)
4.9/5
(35)
In the following code, System.out.println(num) is an example of __________. double num = 5.4;
System.out.println(num);
Num = 0.0;
(Multiple Choice)
4.9/5
(30)
Given the following method header, which of these method calls is incorrect? public void displayValue(int x, int y);
(Multiple Choice)
4.9/5
(39)
Which type of method performs a task and sends a value back to the code that called it?
(Multiple Choice)
4.8/5
(39)
A __________ is a part of a method that contains a collection of statements that are performed when the method is executed.
(Multiple Choice)
4.8/5
(41)
Showing 21 - 40 of 56
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)