Sunday, July 29, 2012
It is not allowed since static nature of the method will give permission to access it directly by class name only. But contrarily abstract nature will prohibit it from doing so. This results in a conflicting nature (based on meaning of two modifiers) of the method. Due to this reason Java does not allow you to declare a method both static and abstract. If you try to do this you will get a compile error as illegal combination of modifiers : abstract and static.

0 comments:

Post a Comment

Total Pageviews

Followers


Labels

Popular Posts

free counters