Java Programming Quiz

Java Programming Quiz

12th Grade

17 Qs

quiz-placeholder

Similar activities

CSP Unit 13 Practice Test

CSP Unit 13 Practice Test

9th - 12th Grade

15 Qs

History of Computers

History of Computers

6th - 12th Grade

15 Qs

Python Basics

Python Basics

KG - University

16 Qs

Python Recap

Python Recap

7th Grade - University

20 Qs

Lua Review Corona SDK with Notepad++

Lua Review Corona SDK with Notepad++

10th - 12th Grade

15 Qs

TMK tahun 6: UNIT 3 PENGHASILAN DAN PENGUJIAN ATUR CARA

TMK tahun 6: UNIT 3 PENGHASILAN DAN PENGUJIAN ATUR CARA

1st - 12th Grade

20 Qs

TIK VII YT, GC, VIDCOF

TIK VII YT, GC, VIDCOF

7th - 12th Grade

20 Qs

ISTQB FOUNDATION 4.0 | Tutorial 41

ISTQB FOUNDATION 4.0 | Tutorial 41

12th Grade

14 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?