Adobe
9A0-127 · Question #27
A CFC file named MyComponent.cfc is stored in the cfc subfolder of the web server's document root folder. Which <cfscript> statement correctly creates an instance of the CFC?
The correct answer is B. comp = new cfc.MyComponent(). See the full explanation below for the reasoning.
Question
A CFC file named MyComponent.cfc is stored in the cfc subfolder of the web server's document root folder. Which <cfscript> statement correctly creates an instance of the CFC?
Options
- Acomp = new cfc.MyComponent;
- Bcomp = new cfc.MyComponent();
- Ccomp = cfc.MyComponent();
- Dcomp = createObject("cfc.MyComponent");
How the community answered
(27 responses)- A15% (4)
- B74% (20)
- C4% (1)
- D7% (2)
Community Discussion
No community discussion yet for this question.