is there any way that an interface can instantiate? how?
if it can be done...then what property that object would hold?
There is no way the you can instantiate an interface or an abstract class.
You can only instantiate the class implementing the interface or a class
that extends abstract class.
say you have an interface "InterfaceOne" as follows
public interface InterfaceOne
{
public void methodOne();
}
then you have to write a class as follows
public class InterfaceOneImpl implements InterfaceOne
{
public void methodOne()
{
// logic goes here
}
}
Then you can have a statement
InterfaceOne intf=new InterfaceOneImpl();
intf.methodOne();