How a class can implement an interface?

Answer Posted / mayuri wankhade

without using implements clause it is also possible to use
interface by creating object of an interface in the class
containing main method like :

nameOfInterface Obj = new nameOfInterface()
{
implement a method declared in an interface
};
Obj.MethodName();

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of exceptions?

581


What is a war file?

536


How is the marker interface used in Java?

600


Why pass by reference is not possible in java?

487


Does windows 10 need java?

588






What is class??

747


What is instance synchronization?

530


What is super in java?

567


What is an array in java?

634


How to call one constructor from the other constructor ?

595


Is 0 an even number?

537


How many bits is a char?

531


List the different types of classloaders in java.

496


Is string a datatype?

545


What are encapsulation, inheritance and polymorphism?

519