Java Programming Quiz

Java Programming Quiz

12th Grade

17 Qs

quiz-placeholder

Similar activities

Python Quiz For Starters

Python Quiz For Starters

3rd Grade - Professional Development

17 Qs

Django-quiz

Django-quiz

5th Grade - University

20 Qs

Cuestionario de Certificación JS 2024

Cuestionario de Certificación JS 2024

12th Grade

17 Qs

Arduino_Quiz

Arduino_Quiz

12th Grade

20 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

LA7.C7: Turtle Graphics

LA7.C7: Turtle Graphics

9th Grade - University

14 Qs

Arrays, 2D Arrays, and ArrayLists

Arrays, 2D Arrays, and ArrayLists

9th - 12th Grade

15 Qs

Basic CSS3

Basic CSS3

9th - 12th Grade

12 Qs

Java Programming Quiz

Java Programming Quiz

Assessment

Quiz

Computers

12th Grade

Practice Problem

Medium

Created by

Fidaa Abed

Used 4+ times

FREE Resource

AI

Enhance your content in a minute

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

17 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What keyword is used to declare instance variables private in Java?

public

protected

private

static

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which naming convention is followed for class names in Java?

Pascal Case

Snake Case

Camel Case

Kebab Case

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default initial value for a String instance variable in Java?

Empty String

0

null

undefined

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following describes a local variable in Java?

It exists only within a method

It is accessible to all classes

It is initialized by default

It is declared outside of methods

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which keyword is used to create an object in Java?

make

new

create

object

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What method is used to set the name of an object in the Account class example?

getName

setName

assignName

setAccountName

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen if a method has a local variable with the same name as an instance variable?

Compilation error

Method will use the instance variable

Method will use the local variable

An exception will be thrown

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?