posted 16 years ago
Hi Somnath
Overriding(or Hiding) rules:
1) Static members (methods and variables) invoked based on the type of Object reference, no matter of class instance
2) Same rule apply for non static variables
3) Non static methods invoked based on instance of the class not by the type of object reference
For any static or non static member overriding(or hiding), purpose is same: override(or hide) and make use of the one that is required at runtime
Thanks,
Alpesh
[ August 18, 2008: Message edited by: Alpesh Vesuwala ]
Sun Certified Java Programmer<br />Sun Certified Mobile Application Developer