wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

PreTrainingClassesObjectsMethods

Total questions: 10

Worksheet time: 8mins

Name
Class
Date
1.

What are Objects?

a)

Blueprints detailing the states and behaviors of objects

b)

Any entity with states and behaviors

c)

A coordinated set of instructions which can return a value or void depending on it's return type

2.

What are Methods?

a)

Blueprints detailing the states and behaviors of objects

b)

Any entity with states and behaviors

c)

A coordinated set of instructions which can return a value or void depending on it's return type

3.

What are classes?

a)

Blueprints detailing the states and behaviors of objects

b)

Any entity with states and behaviors

c)

A coordinated set of instructions which can return a value or void depending on it's return type

4.

It's best practice for all classes to have ____.

a)

Their own .java file

b)

A main method

c)

The final access modifier

d)

The abstract keyword

5.

The main method has a very particular signature. It must look like ____

a)

void main(String[] args)

b)

public static main(String[] args)

c)

public static void main(String[] args)

6.

What portion of the main method's signature can be changed?

a)

public static

b)

void

c)

main

d)

String[] args

7.

What is included in a method declaration, but not a method invokation?

a)

access modifiers

b)

parameter datatypes

c)

a code block

d)

all of the above

8.

In Java, class names should be written in ___, method names should be written in ___.

a)

camelCase, PascalCase

b)

PascalCase, camelCase

c)

snake_case, SCREAMING_SNAKE_CASE

9.

To access a method or variable from within an object, we use ___

a)

Dot notation

b)

Square bracket notation

c)

Parenthesis notation

d)

up arrow notation

10.

What is a main method?

a)

The only place we can write code

b)

The starting point for the program

c)

The only method we can put in the main class