S
syntax
hi, i have some basic question on interface....
question1
------------
it is called that interfaces are similar to classes.
so, as classes can produce objects by usuing "new" keywords, can
interfaces do the same thing?
or in other words, does interfaces produce "object like" things
similar to classes?
question2
-----------
suppose a class is "implementating" an interface....so the class is
defining the method which is declared in the interface.
i want to know what would be the possible return types of the
following
return type = ObjectOftheClass.MethodDeclaredIntheInterface()
what would be return type? will it be a object of the class? or will
it be a "object like" thing of the interface?(if it exists!)
thanks
question1
------------
it is called that interfaces are similar to classes.
so, as classes can produce objects by usuing "new" keywords, can
interfaces do the same thing?
or in other words, does interfaces produce "object like" things
similar to classes?
question2
-----------
suppose a class is "implementating" an interface....so the class is
defining the method which is declared in the interface.
i want to know what would be the possible return types of the
following
return type = ObjectOftheClass.MethodDeclaredIntheInterface()
what would be return type? will it be a object of the class? or will
it be a "object like" thing of the interface?(if it exists!)
thanks