Thread: Static class
View Single Post
  #5 (permalink)  
Old December 16th, 2010, 02:09 AM
arnab-jit arnab-jit is offline
Authorized User
Points: 403, Level: 7
Points: 403, Level: 7 Points: 403, Level: 7 Points: 403, Level: 7
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2009
Location: Kolkata, India
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Question

By inheriting a class we can create one or more specific functionality. For example 'Animal' to 'Dog'. But if the Animal and Dog class are static, then what will be the problem? Why we can not extends the static functionality?

One thing is that we can not create any object for static class. So by inheriting them we can not do any dynamic polymorphism with that. Brcause dynamic polymorphism is totally based on runtime object type. It will be a good reason to not allowinging static class in inheritence.

Am I right?
__________________
Happy coding...

Arnab Roy Chowdhury.