Java Objects Basics Quiz

Java Objects Basics Quiz

University

20 Qs

quiz-placeholder

Similar activities

Web Development and Programming

Web Development and Programming

University

20 Qs

ICT QUIZ

ICT QUIZ

University

20 Qs

OS Quiz-1

OS Quiz-1

University

15 Qs

UTS Praktikum SDA KOM B

UTS Praktikum SDA KOM B

University

20 Qs

The AI Shield

The AI Shield

University

15 Qs

Digital Etiquette

Digital Etiquette

4th Grade - University

15 Qs

Post Test ComputerProgramming

Post Test ComputerProgramming

University

20 Qs

Mapeamento e Normalização BD

Mapeamento e Normalização BD

University - Professional Development

15 Qs

Java Objects Basics Quiz

Java Objects Basics Quiz

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

VIKAS BANDARU

Used 11+ times

FREE Resource

AI

Enhance your content in a minute

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

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

In Objects-First learning, what is the blueprint that defines state and behaviour for objects?

Object
Class
Field
Method
Package

Answer explanation

A class defines the fields (state) and methods (behaviour); objects are instances.

2.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

In Circle, which of the following are part of the state?

diameter
xPosition
isVisible
draw()
moveRight()

Answer explanation

State is stored in fields; draw()/moveRight() are behaviours (methods).

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Guess the concept name: “A block of code defined in a class that can make an object act and may change its fields.”

Field
Constructor
Behaviour (method)
Package
Type

Answer explanation

Behaviours are methods; they can change the object’s state.

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Immediately after Circle c = new Circle(); (no other calls), what is c.color?

"red"
"blue"
"green"
null
"black"

Answer explanation

The default constructor sets color = "blue".

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

After Square s = new Square(); s.moveLeft(); s.moveUp();, what are (xPosition, yPosition)?

(330, 140)
(310, 120)
(290, 100)
(290, 120)
(310, 100)

Answer explanation

Start (310,120). Left → x=290; Up → y=100.

6.

MULTIPLE SELECT QUESTION

30 sec • 1 pt

Which actions directly change state without needing extra information?

moveRight()
moveHorizontal(int distance)
makeVisible()
changeColor(String)
moveDown()

Answer explanation

moveRight()/moveDown() have fixed deltas; makeVisible() flips isVisible. Others need parameters.

7.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Guess the meaning: In this chapter’s context, “state change” primarily means…

Modifying method signatures
Changing the values of the object’s fields
Creating a new instance
Compiling the project
Importing a package

Answer explanation

State is represented by field values; changing them changes the state.

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

Already have an account?