1 2 Previous Next 19 Replies Latest reply on Apr 28, 2010 6:22 AM by 791266

    Objects method in interface refrence.

      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