Java - Writing Methods
Quiz
•
Computers, Instructional Technology
•
9th - 12th Grade
•
Practice Problem
•
Medium
Used 332+ times
FREE Resource
Enhance your content in a minute
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a reason for using procedural abstraction?
Divide a problem into subproblems to solve it a piece at a time
Reuse code by putting it in a method and calling it whenever needed
Smaller methods are easier to debug and understand
Passing arguments to parameters are required when writing methods
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a step to creating and calling a method:
Declare an Object of your class in the main method
Call the method by using objectName.methodName()
Write the method definition (signature) with the header and body
Use System.out.println() to debug your program
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following method calls is INVALID? Assume the object name is song and the method name is chorus.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When you create your own method, the variables you define for it in the method header are called
formal parameters
actual parameters (arguments)
objects
primitives
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct method header for this method call:
song.verse(3, "Bob");
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Multimedia Prelim HSC Prep
Quiz
•
11th - 12th Grade
10 questions
Star & Mesh Networks
Quiz
•
9th - 12th Grade
10 questions
Java Script
Quiz
•
9th Grade
10 questions
Google Apps
Quiz
•
4th - 12th Grade
10 questions
PC1.8 Evaluate computer program
Quiz
•
9th Grade
10 questions
EXIT TICKET
Quiz
•
9th - 12th Grade
10 questions
Recap: Introduction to Python
Quiz
•
10th Grade
10 questions
Computer System
Quiz
•
8th - 9th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
