Question
interface A
{ void a(); }
abstract class B implements A
{ abstract void b(); }
class C extends B
{
//Missing methods
}
a.
@Override
public void a() { }
@Override
void b() {}
b.
@Override
public void a() { }
c.
@Override
void b() {}
d.
All the above
Posted under Java Programming
public void a() { }
@Override
void b() {}
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Which is the missing code to successfully compile the below Java program with abstract classes and Interfaces?
Similar Questions
Discover Related MCQs
Q. A Superinterface is comparable to a Superclass. State TRUE or FALSE.
View solution
Q. A Static method of an Interface should be accessed with _____ and a DOT operator.
View solution
Q. What is a package in Java?
View solution
Q. Choose the correct syntax of a Java Package below.
View solution
Q. The keyword used to declare a Java package is ____.
View solution
Q. What is the maximum number of Java Class files that can be kept inside a single Java Package?
View solution
Q. The name of a package is the name of the ___ in Java.
View solution
Q. It is possible to declare a package and import another package within the same Java class file. State TRUE or FALSE.
View solution
Q. The keyword used to import a package into Java class or Interface is ___.
View solution
Q. Which is the correct syntax to import a Java package below?
View solution
Q. Choose correct declaration and importing of packages in Java.
View solution
Q. You can use the same name for a Parent package and Child package in Java. State TRUE or FALSE.
View solution
Q. What is the maximum number of levels or depth up to which sub-packages can be defined in Java?
View solution
Q. Choose a correct statement below about importing packages into a class.
View solution
Q. When importing a Package, theClass isactually importing ____.
View solution
Q. The package declaration statement should be the first statement in a Java file. State TRUE or FALSE.
View solution
Q. You can place a comment before the Package Declaration statement in Java. State TRUE or FALSE.
View solution
Q. How does JAVAC or JAVA (JVM) find the packages that will be used inside classes by an import statement?
View solution
Q. Which is the default Java package that will be auto included (imported) in the classpath while Compiling and Running a Java program?
View solution
Q. What are the popular Classes or Interfaces inside a Java Language Pack (java.lang)?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Java Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!