Calling Methods

Calling Methods

Assessment

Interactive Video

Computers

9th - 12th Grade

Easy

Created by

Myra Deister

Used 2+ times

FREE Resource

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a method in Java?

 A type of object

A named set of instructions to perform a task

A variable in a class

A way to create new objects

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a parameter in the context of a Java method?

The name of the method

The result of the method

A variable in the method that defines the type of value to receive

The object on which the method is called

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is an argument in Java?

A disagreement between two objects

A value passed to a method when it is called

A type of variable

The name of a class

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following correctly represents how to call the bark method on the dog object?

fido(bark.3);

fido.bark(3);

3.bark(fido);

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of methods in object-oriented programming?

To store data in objects

To create new classes

To give commands to objects

To define the structure of a program