Exam 5: Methods
Exam 1: Introduction to Computers and Java42 Questions
Exam 2: Java Fundamentals53 Questions
Exam 3: Decision Structures52 Questions
Exam 4: Loops and Files48 Questions
Exam 5: Methods50 Questions
Exam 6: A First Look at Classes49 Questions
Exam 7: A First Look at Gui Applications49 Questions
Exam 8: Arrays and the Arraylist Class52 Questions
Exam 9: A Second Look at Classes and Objects40 Questions
Exam 10: Text Processing and More About Wrapper Classes49 Questions
Exam 11: Inheritance49 Questions
Exam 12: Exceptions and Advanced File Io46 Questions
Exam 13: Advanced Gui Applications46 Questions
Exam 14: Applets and More39 Questions
Exam 15: Recursion34 Questions
Exam 16: Sorting, Searching, and Algorithm Analysis46 Questions
Exam 17: Generics50 Questions
Exam 18: Collections50 Questions
Exam 19: Array-Based Lists20 Questions
Exam 20: Linked Lists36 Questions
Exam 21: Stacks and Queues36 Questions
Exam 22: Binary Trees, Avl Trees, and Priority Queues45 Questions
Select questions type
In the method header the static method modifier means the method is available to code outside the class.
(True/False)
4.9/5
(46)
Which of the following would be a valid method call for the following method? public static void showProduct(double num1,int num2)
{
Double product;
Product = num1 * num2;
System.out.println("The product is " +
Product);
}
(Multiple Choice)
4.9/5
(42)
Given the following method header,which of the method calls would be an error? public void displayValues(int x,int y)
(Multiple Choice)
4.8/5
(28)
Given the following method header,which of the method calls would be an error? public void displayValues(double x,int y)
(Multiple Choice)
4.8/5
(30)
This type of method performs a task and sends a value back to the code that called it.
(Multiple Choice)
4.9/5
(37)
Which of the following is not a benefit derived from using methods in programming?
(Multiple Choice)
4.7/5
(37)
Constants,variables,and the values of expressions may be passed as arguments to a method.
(True/False)
4.9/5
(44)
What will be the result of the following code? int num;
String str = "555";
Num = Integer.parseInt(string str)+ 5;
(Multiple Choice)
4.9/5
(39)
Showing 41 - 50 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)