Search Header Logo

JAVA Summer Internship Quiz-13

Authored by Gnaneshwar Reddy

Other

University

Used 1+ times

JAVA Summer Internship Quiz-13
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

1. What is inheritance in Java?

A) A way to implement abstraction

B) A mechanism to create a new class from an existing class

C) A technique to handle exceptions

D) A method to optimize code execution

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

2. What keyword is used to inherit a class in Java?

A) inherit

B) extends

C) implements

D) inherits

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

3. Which of the following is true about polymorphism in Java?

A) It allows a class to have multiple methods with the same name but different parameters

B) It allows a class to inherit from multiple classes.

C) It ensures that a method has a fixed implementation.

D) It is a way to declare abstract methods in a class.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

4. What does the super keyword do in Java?

A) It creates a new instance of the current class.

B) It refers to the immediate parent class of the current class.

C) It is used to call methods of the current class.

D) It terminates the current loop.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

5. What is an abstract class in Java?

A) A class that can be instantiated but has abstract methods.

B) A class that cannot be instantiated and may contain abstract methods.

C) A class that implements all methods in its interface.

D) A class that only contains static methods.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

6. Which of the following can be abstract in an abstract class?

A) Methods only

B) Fields only

C) Constructors only

D) Methods and fields

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

7. How do you achieve runtime polymorphism in Java?

A) By using abstract classes

B) By using method overloading

C) By using method overriding

D) By using static methods

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?