Skip to Content
0
Former Member
Jan 23, 2009 at 08:09 AM

protected class

32 Views

hi ppl,

Iam new to this oops concept..i learnt that to access the contents of a protected class either we have call by subclass and another is with in itself.so how can we call a protected class with in class itself..pls do alter this code to call within itself

class snap definition.

protected section.

methods: m1.

data: d type char20 value 'PROTECTED'.

endclass.

class snap implementation.

method: m1.

write:/ d.

endmethod.

endclass.

start-of-selection.

data obj type ref to snap.

create object obj.

call method->m1.

end-of-selection.