Hi all i had a doubt. Do interfaces inherit from the OBJECT class??I think no.
For example ( Comparable is an interface ) .And we can have varibles of an interface in Java ,, so
Comparable obj = new fruit(); String na1 = obj.getName(); // Assuming getName() in in fruit
obj.getName generates an error because Comparable is an inteface that can not have any implementation for getName() (inheritance concept).
But if we say " obj.toString() " ( toString() is a function in the Object class ) , this is said to work ,unless obj inherits the "toString()" function , how can it access toString in Class fruit.(If obj could not access getName() then it shouldnt be able to access toString() also ).