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. Which of the following are benefits of using methods in programming?
(Multiple Choice)
4.7/5
(30)
When a method tests an argument and returns a true or false value, it should return __________.
(Multiple Choice)
5.0/5
(39)
Given the following method, which of these method calls is valid?
public static void showProduct (double num1, int num2)
{
Double product;
Product = num1 * num2;
System.out.println("The product is " + product);
}
(Multiple Choice)
4.8/5
(34)
A value-returning method must specify __________ as its return type in the method header.
(Multiple Choice)
4.8/5
(33)
When an argument value is passed to a method, the receiving parameter variable is __________.
(Multiple Choice)
4.8/5
(38)
When an object, such as a String, is passed as an argument it is __________.
(Multiple Choice)
4.8/5
(37)
Given the following method header, which of these method calls is incorrect? public void displayValue(double x, int y);
(Multiple Choice)
4.9/5
(31)
All @param tags in a method's documentation must __________.
(Multiple Choice)
4.9/5
(44)
What will be returned from the following method?
public static double methodA()
{
Double a = 8.5 + 9.5;
Return a;
}
(Multiple Choice)
4.8/5
(46)
When writing documentation comments for a method, you can provide a description of each parameter by using a __________.
(Multiple Choice)
4.8/5
(41)
Constants, variables, and the values of expressions may be passed as arguments to a method.
(True/False)
4.8/5
(49)
What will be the result after the following code executes? int num;
String str = "555";
Num = Integer.parseInt(string str) + 5;
(Multiple Choice)
4.8/5
(39)
Showing 41 - 56 of 56
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)