ABAP Certification Questions and Answers - SAP


SAP Certified Associate Certification - ABAP Certification

ABAP Object Oriented Programming


1.    Which of the following is a t rue statement:
A. Static attributes ca n be declared only in the private visibility section of the class.
B.Static attributes are declared with the CLASS - DATA statement.
C. A static attribute is the same across all instances of the class. There is only
one static attribute across all instances of the class.
D.Static attributes cannot be changed by an object.

Correct answers: B. C


2.    Private components  of the class cannot  be addressed directly from outside the class except when the friendship concept applies.
A- True
B.False

Correct answer: A


3.   Subclasses can access the private components  of the parent class.
A. True
B. False

Correct answer:  B


4.   Subclasses inherent all the components of the parent class.
A. True
B. False

Correct answer: A


5.   Public methods ca n access the private attributes of the same class.
A. True
B. False

Correct answer: A


6.    Protected  attributes  can  be accessed by methods of the class and  its sub­
classes.
A. True
B. False

Correct answer: A


7.    You cannot use the LIKE statement to define an attiibute in a class.
A. True
B. False

Correct answer: B


8.    The READ ONLY addition  for the attribute declaration can be used in the private and public visibility section.
A. True
B. False

Correct answer: B


9.    The READ ONLY attribute ca n not be addressed outside the class.
A.True
B. False

Correct answers: A, B, C, D


 10.  Which of the following are correct statements?
A. Class methods  assigned to the public visibility section ca n be accessed outside  the class using the static component selector and the class name.
B. Static methods can be defined in both the public and private visibility section of the class.
C. Only public methods ca n be addressed  outside the  class.
D. You can call private methods  within  the public methods  without  reference to the object or class.
E. None of the above

Correct answer: A


11. The constructor method is called automatically when you create an instance of the class.
A. True
B. False

Correct answer: A


12.  The class constructor method is called automatically when you access the class for the first time.
A.True
B.False

Correct answer: B


13. The constructor method is always defined in the private visibility section of the class.
A. True
B.False

Correct answer: B


14.  You can call the constructor method directly.
A. True
B.False

Correct answer: A

No comments:

Post a Comment