Basic Java Week 4-5 Quiz

Basic Java Week 4-5 Quiz

University

15 Qs

quiz-placeholder

Similar activities

Java Quiz#2(Non-static Variables)

Java Quiz#2(Non-static Variables)

University

10 Qs

Talent Next Java MCQ-1

Talent Next Java MCQ-1

University

10 Qs

ADVANCE JAVA

ADVANCE JAVA

University

20 Qs

OOP

OOP

University

20 Qs

Quiz-Girlz

Quiz-Girlz

University

20 Qs

JDBC

JDBC

University

20 Qs

Java Programming

Java Programming

University

20 Qs

Stings, Cloning and ArrayList

Stings, Cloning and ArrayList

University

10 Qs

Basic Java Week 4-5 Quiz

Basic Java Week 4-5 Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Omphile Mosingathi

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is true about a static variable in Java?

It is unique to each object of the class.

It is shared among all objects of the class.

It cannot be modified once initialized.

It can only be accessed by instance methods.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following statements about instance methods is true?

They can only access static variables.

They can only be called using an object.

They cannot access static methods.

They must always return a value.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you call a static method in Java?

Using an object of the class.

Using the class name.

Using the this keyword.

Using the super keyword.

4.

FILL IN THE BLANK QUESTION

1 min • 2 pts

A method that belongs to an object and requires an instance to be called is

known as an _________ method.

5.

FILL IN THE BLANK QUESTION

1 min • 2 pts

A static variable is stored in the _________ memory area, making it shared

across all instances of a class.

6.

FILL IN THE BLANK QUESTION

1 min • 1 pt

The keyword _________ is used to define a method that cannot be overridden in a subclass.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

A static method can access instance variables directly.

True

False

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?