Adobe
9A0-182 · Question #85
You have a custom class with a private property _name: private var _name:String; How should you declare an implicit getter for _name?
The correct answer is B. public function get name():String { return _name; }. Adobe 9A0-182 Exam
Interactivity and ActionScript 3.0
Question
You have a custom class with a private property _name:
private var _name:String; How should you declare an implicit getter for _name?
Options
- Apublic function getName():String { return _name; }
- Bpublic function get name():String { return _name; }
- Cpublic function name():String {return _name; }
- Dpublic function get _name():String {return _name; }
How the community answered
(24 responses)- A8% (2)
- B75% (18)
- C4% (1)
- D13% (3)
Explanation
Adobe 9A0-182 Exam
Topics
#ActionScript 3.0#implicit getter#private property accessor#OOP encapsulation
Community Discussion
No community discussion yet for this question.