Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
Can a class have an interface?
Home
JAVA
Can a class have an interface?
+1
vote
asked
May 5, 2021
in
JAVA
by
SakshiSharma
Can a class have an interface?
#interface
java
Java-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 5, 2021
by
SakshiSharma
Yes, an interface can be defined within the class. It is called a nested interface.
Related questions
+1
vote
Q: Can an Interface have a class?
asked
May 5, 2021
in
JAVA
by
SakshiSharma
#interface
class
Java-questions-answers
0
votes
Q: What is an interface in java?
asked
Oct 18, 2020
in
JAVA
by
sharadyadav1986
#interface-in-java
#what-is-an-interface
#interface
Java-questions-answers
0
votes
Q: What is a marker interface?
asked
May 2, 2021
in
JAVA
by
sharadyadav1986
#interface
make
maker-interface
Java-questions-answers
0
votes
Q: What is interface in java?
asked
Oct 18, 2020
in
JAVA
by
sharadyadav1986
#interface-in-java
#java-interface
#interface
Java-questions-answers
0
votes
Q: When can an object reference be cast to an interface reference?
asked
May 2, 2021
in
JAVA
by
sharadyadav1986
#object-reference
java
Java-questions-answers
0
votes
Q: An interface with no fields or methods is known as a ______.
asked
Apr 8, 2021
in
JAVA
by
SakshiSharma
java
java-questions-and-answers
java-mcq
core-java-mcq
java-multiple-choice-questions
java-questions-2021
java-interview-questions
java-advanced-questions
Java-questions-answers
+2
votes
Q: Can you write a Java class that could be used both as an applet as well as an application?
asked
May 12, 2021
in
JAVA
by
rajeshsharma
java-class
java-application
java
Java-questions-answers
+2
votes
Q: How can we create an immutable class in Java?
asked
May 4, 2021
in
JAVA
by
SakshiSharma
#immutable-class
java
Java-questions-answers
0
votes
Q: Can subclass overriding method declare an exception if parent class method doesn't throw an exception?
asked
May 3, 2021
in
JAVA
by
Robindeniel
#subclass
overriding
java
Java-questions-answers
0
votes
Q: Can the Interface be final?
asked
May 2, 2021
in
JAVA
by
sharadyadav1986
java
interface
Java-questions-answers
...