My Report

Java Interface Test – 2


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement

1. What does an interface contain?

2. All methods must be implemented of an interface.

3. Which of the following access specifiers can be used for an interface?

4. Which of the following is the correct way of implementing an interface A by class B?

5. What type of variable can be defined in an interface?

6. What will happen if we provide concrete implementation of method in interface?

7. What happens when a constructor is defined for an interface?

8. Can “abstract” keyword be used with constructor, Initialization Block, Instance Initialization and Static Initialization Block.

9. What type of methods an interface contain by default?

10. What happens when we access the same variable defined in two interfaces implemented by the same class?


 

Start practicing “1000 MCQs on Java”, and once you are ready, you can take tests on all topics by attempting our “Java Test Series”.

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.