Static and instance components in ABAP Objects

Go down

Static and instance components in ABAP Objects

Post  Uma_ABAP on Sat Mar 31, 2012 11:40 pm

The class components that have been declared fall under two category static and instance.
Now what do we mean by this actually? As we know class is only a logical modelling of an
object .It does not occupies any memory space during program execution only the instance of
an class (objects) occupies memory space. We know a class can have multiple instance i.e
multiple object can refer to same class. And in oop separate memory are allocated for all
different objects and these memory area are not shareable by other objects . But it is
possible to have only one common memeory area for all instance of a class.

The class components that share a common memory area for all the class instance are
static components. The class components that have separate memory area for separate
instance are instance components.

A point of note that a class can have static as well as instance components. Only static
methods can access static attribute and static event can be raised by static methods and
the same is true for instance methods attributes and events

Uma_ABAP

Posts : 56
Join date : 2012-03-31

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum