m() in And2 cannot oveeride m() in And; attempting to assign weaker access privileges; was public
Since static methods cannot be over-ridden(and no overriding rules are applied to them), why would compiler even complain about it?
Joined: Dec 10, 2009
actually static methods cant be overridden but can be redefined...and the rules for redefining are the same as overridden...its just that actually the polymorphism cant be used with static methods...thats all that is
Chintan B Shah
Joined: Sep 23, 2008
Got it..Thanks Raju.
Wow!! I am learning some great new stuff here...not taught in class. Javaranch rocks!!!