Java - Writing Methods

Quiz
•
Computers, Instructional Technology
•
9th - 12th Grade
•
Medium
Used 306+ times
FREE Resource
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");
Similar Resources on Wayground
10 questions
csv and DataFrame

Quiz
•
12th Grade
10 questions
Java Inheritance Quiz

Quiz
•
11th Grade
10 questions
Technical Terms - Internet (A-Z) - CORS

Quiz
•
12th Grade
10 questions
Technical Terms - Internet (A-Z) - URI

Quiz
•
12th Grade
10 questions
CS Python Fundamentals Test 12 PRACTICE

Quiz
•
9th - 12th Grade
9 questions
11.2.2 - TCP/IP Protocol Facts

Quiz
•
10th Grade
10 questions
PD.Fungsi

Quiz
•
10th Grade
10 questions
Office Scripts Quiz

Quiz
•
12th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
CTEA Computer Vocab Terms #1

Quiz
•
12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade