Java Quiz 2

Java Quiz 2

University

10 Qs

quiz-placeholder

Similar activities

JAVA UNIT 1 PART 2

JAVA UNIT 1 PART 2

University

15 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

Objects, Classes, and Methods Terminology

Objects, Classes, and Methods Terminology

University

8 Qs

JAVA FOR ANDROID-JAVA

JAVA FOR ANDROID-JAVA

University

10 Qs

Java Interfaces

Java Interfaces

University

10 Qs

JAVA FINAL QUIZ FOR ASSESSMENT

JAVA FINAL QUIZ FOR ASSESSMENT

University

15 Qs

Kuis PBo Inheritance

Kuis PBo Inheritance

University

10 Qs

C - Java class

C - Java class

University

10 Qs

Java Quiz 2

Java Quiz 2

Assessment

Quiz

Computers

University

Medium

Created by

Navina Robinson

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is passed when an object is passed to a method in Java?

A new copy of the object                             

A reference to the original object

A copy of the object reference                      

The actual object itself

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is required for a recursive method to terminate correctly?

A loop           

A base case              

A class constructor                 

A static keyword

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the static keyword in Java indicate?

method or variable belongs to an instance of the class           

method or variable belongs to the class itself                           

method cannot return a value

variable is final and cannot change

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you pass command-line arguments to a Java program?

Through a file                                                              

Through the main() method's parameters                    

Through the keyboard

Through the constructor

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about inheritance in Java?

Java supports multiple inheritance through classes        

Java supports multiple inheritance using interfaces        

A class can inherit from multiple classes

Java does not support inheritance

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not true about the super keyword?

It can be used to access superclass fields                        

It can be used to call superclass constructors                 

It can be used to call superclass methods

It can be used to override static methods

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Why is dynamic method dispatch useful?

For compile-time polymorphism                          

For achieving run-time polymorphism                 

For calling private methods

For method overloading

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?