Java Method Quiz

Java Method Quiz

9th - 12th Grade

20 Qs

quiz-placeholder

Similar activities

Coding Test Review

Coding Test Review

9th - 12th Grade

21 Qs

Python Programming

Python Programming

11th Grade

17 Qs

C# 101 Assessment

C# 101 Assessment

9th - 12th Grade

20 Qs

1) Python Data Types

1) Python Data Types

8th - 11th Grade

19 Qs

Unit 8 - Searching and Sorting

Unit 8 - Searching and Sorting

9th - 12th Grade

15 Qs

UTS SMT Genap PBO 11 RPL

UTS SMT Genap PBO 11 RPL

11th Grade

15 Qs

Code.org: AP CSA U3, Lessons 1-6 Review

Code.org: AP CSA U3, Lessons 1-6 Review

11th - 12th Grade

20 Qs

Progamming - Java Syntax

Progamming - Java Syntax

11th - 12th Grade

15 Qs

Java Method Quiz

Java Method Quiz

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Arasaka Teacher

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A small block of code that is created outside of the main code block is called a:

method.

keyword.

variable.

variable type.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why do we use methods in Java?

Methods help organize code and make it reusable.
Methods are only for advanced programmers.
Methods make the code slower and harder to read.
Methods are used to create graphics in Java.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does "public" mean in the method signature?

Public means the method can only be used in the same class.
Public means the method is hidden from other parts of the program.
Public means the method can be used by anyone in the program.
Public means the method can only be used by the creator.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does "void" mean in the method signature?

Void means the method returns a string.
Void means the method is not executed.
Void means the method can return multiple values.
'Void' means the method does not return a value.

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 values that gets passed into a method.

The type that is given to a variable.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

When a method finishes its work and gives back something, that something is called:

a print statement.

an argument.

a parameter.

a return value.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if you try to give a method the wrong type of value?

The method will automatically fix the value.
The program will ignore the value.
The program will run faster.

The program will produce an error.

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?