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')];
}
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.
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.
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
...
This section is not available anymore. Please use the main Exam Page.CRT-450 Exam Questions
Log in to ExamTopics
Sign in:
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.
awesomemammt
Highly Voted 4 years agoAmpsindhu
Highly Voted 3 years, 4 months agotheonly1
Most Recent 9 months agoskhan6525
9 months, 3 weeks agoKF1TZ
9 months, 4 weeks agoapuchowdhury80
1 year, 5 months agoApexMike
1 year, 8 months agoishanjn05
1 year, 10 months agoquestmajor
2 years, 3 months agoBervianto
2 years, 6 months agoPriyasri
2 years, 6 months agoBalrick
2 years, 10 months agolaksg_07
3 years, 10 months ago