Thursday, February 28, 2008

Memories..(1)


What are the three most important features of OOP?

Encapsulation:
Encapsulation conceals the functional details of a class from objects that send messages to it.

Inheritance:
‘Subclasses’ are more specialized versions of a class, which inherit attributes and behaviors from their parent classes, and can introduce their own.

Polymorphism (Overloading, Overriding):
Polymorphism allows you to treat derived class members just like their parent class' members


What is a garbage collector and how does it work?
garbage collection (GC) is a form of automatic memory management.
Garbage collection is often portrayed as the opposite of manual memory management, which requires the programmer to specify which objects to deallocate and return to the memory system.it frees the programmer from having to worry about releasing objects that are no longer needed.
The basic principle of how a garbage collector works is:
Determine what data objects in a program will not be accessed in the future
Reclaim the resources used by those objects



Reference: http://en.wikipedia.org

No comments: