W3
Teacher
Explore
Browse by field
Artificial Intelligence
Accounting & Finance
Information Technology
Show all fields
Interview Q&A
All Interview Questions
Beginner
Intermediate
Advanced
Practice
MCQs
Quizzes
Mock Interviews
About
Light
Dark
Auto
Sign in
Get Started
Search interview questions
Search
78 questions for “Interfaces & Abstract Classes”
Found in 1 field. Select a question to see its full answer.
Matching topics
C#
Interfaces
&
Abstract
Classes
17
Java
Interfaces
&
Abstract
Classes
15
PHP
Interfaces
&
Abstract
Classes
7
Java
Functional
Interfaces
& Method References
1
Information Technology
78 questions in 4 technologies
#
Question
Technology
Topic
Level
1
Can an interface extend multiple other
interfaces
simultaneously, and how does this differ from a class's single-inheritance restriction for
abstract
/concrete
classes
?
Java › Interfaces & Abstract Classes
Java
Interfaces
&
Abstract
Classes
Intermediate
2
How does the Liskov Substitution Principle relate to properly designing
interfaces
and
abstract
classes
so that sub
classes
can genuinely be substituted for their parent type without breaking expected behavior?
PHP › Interfaces & Abstract Classes
PHP
Interfaces
&
Abstract
Classes
Advanced
3
How would you use an
abstract
class to implement the Template Method pattern, defining a fixed algorithm skeleton with some steps left
abstract
for sub
classes
to fill in?
Java › Interfaces & Abstract Classes
Java
Interfaces
&
Abstract
Classes
Intermediate
4
How do you decide whether to use an interface or an
abstract
class when designing a set of related
classes
that share common behavior?
PHP › Interfaces & Abstract Classes
PHP
Interfaces
&
Abstract
Classes
Intermediate
5
How does PHP's type system use
interfaces
to enable polymorphism, allowing different concrete
classes
to be used interchangeably wherever the interface type is expected?
PHP › Interfaces & Abstract Classes
PHP
Interfaces
&
Abstract
Classes
Intermediate
6
How would you design a class hierarchy combining an
abstract
base class WITH multiple
interfaces
to model both shared implementation AND multiple independent capabilities?
C# › Interfaces & Abstract Classes
C#
Interfaces
&
Abstract
Classes
Advanced
7
How does the 'sealed' modifier interact with
abstract
classes
and interface method overrides to control further extensibility?
C# › Interfaces & Abstract Classes
C#
Interfaces
&
Abstract
Classes
Advanced
8
How would you use an
abstract
class combined with the Non-Virtual Interface (NVI) idiom to enforce that certain methods are always called in a specific pattern, even when sub
classes
override customizable parts?
Java › Interfaces & Abstract Classes
Java
Interfaces
&
Abstract
Classes
Advanced
9
How can PHP's interface based type hinting combined with
abstract
classes
support building a genuinely extensible plugin architecture within an application?
PHP › Interfaces & Abstract Classes
PHP
Interfaces
&
Abstract
Classes
Advanced
10
What is the difference between an interface and an
abstract
class in C#, and when should you choose one over the other?
C# › Interfaces & Abstract Classes
C#
Interfaces
&
Abstract
Classes
Beginner
Show all 78 questions in Information Technology