2.3-4-5 Calling a (non-)Void Method (with Parameters)

2.3-4-5 Calling a (non-)Void Method (with Parameters)

Professional Development

14 Qs

quiz-placeholder

Similar activities

Webinar Kecemerlangan SPM

Webinar Kecemerlangan SPM

Professional Development

10 Qs

Educational Game and Quiz Icons.

Educational Game and Quiz Icons.

Professional Development

10 Qs

Basics of Podcating

Basics of Podcating

Professional Development

13 Qs

Assessment

Assessment

Professional Development

10 Qs

Blockchain Quiz 2

Blockchain Quiz 2

6th Grade - Professional Development

10 Qs

BTS

BTS

1st Grade - Professional Development

10 Qs

Confidence & Positive Attitude

Confidence & Positive Attitude

Professional Development

11 Qs

Quiz_Inclusive_Education

Quiz_Inclusive_Education

Professional Development

12 Qs

2.3-4-5 Calling a (non-)Void Method (with Parameters)

2.3-4-5 Calling a (non-)Void Method (with Parameters)

Assessment

Quiz

Education

Professional Development

Practice Problem

Hard

Created by

Sinan BAL

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which of the following is a correctly written method for the class on the left?

Media Image
Media Image
Media Image
Media Image

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following correctly calls the method addFiveMinutes on an object of the Timer class called kitchenTimer?

kitchenTimer(addFiveMinutes);

Timer.addFiveMinutes();

kitchenTimer.addFiveMinutes();

kitchenTimer.addFiveMinutes;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Suppose the class Timer has a method called startTime that prints out the starting time of the Timer.
Which of the following correctly uses this method to print out the start time of a Timer object called laundry?

System.out.println(laundry.startTime());

System.out.println(laundry.startTime);

int start = laundry.startTime();

laundry.startTime();

laundry.startTime;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

A Timer class is a class that represents a minute timer. A partial definition of the class is given on the left.

The timer will end in 30 minutes

The timer will end in 30 minutes

The timer will end in 35 minutes

The timer will end in 30 minutes

The timer will end in 30 minutes

This method won’t print anything because it doesn’t have any print statements.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What are parameters?

The value that a method returns.


The values that a method prints to the screen.

The formal names given to the data that gets passed into a method.

The type that is given to a variable.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Consider the Circle class on the left.

24.0

20.0

24.0

24.0


Nothing will print because the code contains an error.

24.0

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Consider the class on the left:

If a new variable Rectangle shape = new Rectangle(10, 20); was initialized, what is the correct syntax for retrieving the area of shape?

int area = Rectangle.getArea();

int area = shape.getArea();

shape.getArea(10,20);

Rectangle.getHeight() * Rectangle.getWidth();

shape.getArea();

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?