--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/e2a5299b-580f-4695-ad1a-fe5c26321ae2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
A aa = new AImpl();
aa.a();
Here your reference variable is interface A
type But actual Object
is AImpl
.
When you define a new interface, you are defining a new reference data type. You can use interface names anywhere you can use any other data type name. If you define a reference variable whose type is an interface, any object you assign to it must be an instance of a class that implements the interface.