Search Header Logo

7.02 defining new static methods

Authored by Michael Courtright

Computers

9th - 12th Grade

Used 3+ times

7.02 defining new static methods
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

5 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What type of value is returned by the following method?


public static double someMethod(int[] x)

An array of decimal values

An array of integer values

Nothing is returned

One decimal value

One integer value

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

The method definition, or declaration, is defined as the method __________ followed by the method ________.

name, parameters

name, return

header, body

header, signature

signature, body

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which is a method signature?

int[] someMethod(double x, String s)

public static int[]

public static int[] someMethod(double x, String s)

someMethod(double x, String s)

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

The main method contains the statement int num = someMethod(12, 14);.


What is the result after this statement is executed?

num being assigned the value 5

num being assigned the value 6

num being assigned the value 13

error: missing return statement

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following would be consider modifiers in this static method?


public static int doubleMe (double x)

public, static

int

doubleMe

double x

Access all questions and much more by creating a free account

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

Already have an account?