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
Any method that calls a method with a throws clause in its header must either handle the potential exception or have the same throws clause.
Free
(True/False)
4.7/5
(31)
Correct Answer:
True
Select all that apply. Which of the following types of values can be passed to a method that has an int parameter variable?
Free
(Multiple Choice)
4.9/5
(38)
Correct Answer:
D
In the following code, Integer.parseInt(str) is an example of __________. int num;
String str = "555";
Num = Integer.parseInt(str) + 5;
Free
(Multiple Choice)
4.9/5
(41)
Correct Answer:
A
The expression in a return statement can be any expression that has a value.
(True/False)
4.8/5
(41)
No statement outside the method in which a parameter variable is declared can access the parameter by its name.
(True/False)
4.9/5
(42)
In the method header the static method modifier means the method is available to code outside the class.
(True/False)
4.8/5
(33)
The process of breaking a problem down into smaller pieces is sometimes called __________.
(Multiple Choice)
4.8/5
(33)
What will be returned from the following method?
public static int methodA()
{
Double a = 8.5 + 9.5;
Return a;
}
(Multiple Choice)
5.0/5
(38)
In the header, the method name is always followed by __________.
(Multiple Choice)
4.8/5
(41)
If you attempt to use a local variable before it has been given a value, __________.
(Multiple Choice)
4.8/5
(31)
You should always document a method by writing comments that appear __________.
(Multiple Choice)
4.9/5
(31)
The header of a value-returning method must specify __________.
(Multiple Choice)
4.8/5
(40)
Methods are commonly used to break a problem into small manageable pieces.
(True/False)
4.7/5
(50)
To document the return value of a method you can use a __________.
(Multiple Choice)
4.9/5
(37)
Showing 1 - 20 of 56
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)