WHY WE CANNOT OVERRIDE STATIC METHOD?

Kamlakar Singh

Total Post:80

Points:400
Posted by  Kamlakar Singh
Java 
 590  View(s)
Ratings:
Rate this:
  1. Kamlakar Singh

    Post:80

    Points:400
    Why we cannot override static method?

    It is because the static method is the part of class and it is bound with class whereas instance method is bound with object and static gets memory in class area and instance gets memory in heap.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!