This discussion is archived
1 2 Previous Next 19 Replies Latest reply: Apr 27, 2010 11:22 PM by 791266 RSS

Objects method in interface refrence.

843798 Newbie
Currently Being Moderated
Hi to all,

I am new in java. i have a confusion that how an interface refrence can access method of object class like toString, wait , notify etc.

i have check using reflection that it doesnt have any super class like object. there is no concept of super interface.

how it is possible to get Object class method with interface refrence.

interface xyz{
class abc implements xyz

xyz z=new abc();
z.toString() is perfectly legal statement even the interface doesnt know anything about toString() method, even at runtime.

Plz elaborate.

Thanks in Advance.

"by mistake i potsed this topic in wrong forum"
1 2 Previous Next