Java Methods

Java Methods

Assessment

Flashcard

Computers

12th Grade

Hard

Created by

Quizizz Content

FREE Resource

Student preview

quiz-placeholder

9 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What is the name of the method?
public static void nameReverse(String first, String last)

Back

nameReverse

2.

FLASHCARD QUESTION

Front

What data type does the function method return?
public static int sum(float num1, double num2)

Back

int

3.

FLASHCARD QUESTION

Front

What are the parameters?
public static void fullName(String userFirst, char userMiddle, String userLast);

Back

userFirst, userMiddle, userLast

4.

FLASHCARD QUESTION

Front

These control the behavior of a program.

Back

method

5.

FLASHCARD QUESTION

Front

In a method, the return type should be __________ when the method returns no value.

Back

Void

6.

FLASHCARD QUESTION

Front

Can you have two methods with the same name in the same class file?

Back

YES

7.

FLASHCARD QUESTION

Front

Can you have two methods with the same name and same parameter list in the same class file?

Back

NO

8.

FLASHCARD QUESTION

Front

Which keyword defines that the method below can be called from outside this class file?
public static void fullName(userFirst,userMiddle,userLast);

Back

public

9.

FLASHCARD QUESTION

Front

Which of the following statements is correct?
Options:
Public method is accessible to all other classes in the hierarchy
Public method is accessible only to subclasses of its parent class
Public method can only be called by object of its class
Public method can be accessed by calling object of the public class

Back

Public method is accessible to all other classes in the hierarchy