Java - Writing Methods

Java - Writing Methods

9th - 12th Grade

5 Qs

quiz-placeholder

Similar activities

Java Methods

Java Methods

12th Grade

10 Qs

Word Processing Lesson 2 Review

Word Processing Lesson 2 Review

5th - 9th Grade

10 Qs

Unit 10 - Packet Switching

Unit 10 - Packet Switching

12th Grade - University

10 Qs

Python 2

Python 2

9th - 12th Grade

10 Qs

Unit Terms 2.3 -2.10

Unit Terms 2.3 -2.10

12th Grade

10 Qs

Grade 9 - User Defined Methods

Grade 9 - User Defined Methods

9th Grade

10 Qs

Android Studio Basic

Android Studio Basic

12th Grade

10 Qs

Functions Pt. 2 + Separate Compilation

Functions Pt. 2 + Separate Compilation

9th Grade - University

10 Qs

Java - Writing Methods

Java - Writing Methods

Assessment

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.

Media Image
Media Image
Media Image
Media Image

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");

Media Image
Media Image
Media Image
Media Image