exam questions

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 16 discussion

Actual exam question from Salesforce's CRT-450
Question #: 16
Topic #: 1
[All CRT-450 Questions]

What is the requirement for a class to be used as a custom Visualforce controller?

  • A. Any top-level Apex class that has a constructor that returns a PageReference
  • B. Any top-level Apex class that extends a PageReference
  • C. Any top-level Apex class that has a default, no-argument constructor
  • D. Any top-level Apex class that implements the controller interface
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
awesomemammt
Highly Voted 4 years ago
The right one is the option 'C' ;
upvoted 16 times
...
Ampsindhu
Highly Voted 3 years, 4 months ago
ANS:C
upvoted 6 times
...
theonly1
Most Recent 9 months ago
Answer is C public class MyController { private final Account account; public MyController() { account = [SELECT Id, Name, Site FROM Account WHERE Id = :ApexPages.currentPage().getParameters().get('id')]; }
upvoted 1 times
...
skhan6525
9 months, 3 weeks ago
C is correct
upvoted 1 times
...
KF1TZ
9 months, 4 weeks ago
Selected Answer: C
When a Visualforce page is loaded and uses a custom controller, Salesforce needs to be able to create an instance of the controller without needing any arguments. There isn't a "controller interface" that a custom controller is required to implement.
upvoted 3 times
...
apuchowdhury80
1 year, 5 months ago
Selected Answer: C
Only C is valid
upvoted 4 times
...
ApexMike
1 year, 8 months ago
Selected Answer: C
certainly C
upvoted 3 times
...
ishanjn05
1 year, 10 months ago
Selected Answer: C
A custom controller is an Apex class that uses the default, no-argument constructor for the outer, top-level class. You cannot create a custom controller constructor that includes parameters.
upvoted 2 times
...
questmajor
2 years, 3 months ago
Selected Answer: C
C
upvoted 2 times
...
Bervianto
2 years, 6 months ago
Selected Answer: C
C
upvoted 3 times
...
Priyasri
2 years, 6 months ago
Selected Answer: C
C
upvoted 4 times
...
Balrick
2 years, 10 months ago
Correct Answer is 'C'.
upvoted 4 times
...
laksg_07
3 years, 10 months ago
custom controller class doesn’t inherit from another class, nor does it implement an interface promising to conform to the requirements of a Visualforce controller. answer is C
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...