New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce DEX-450 Exam - Topic 7 Question 50 Discussion

Actual exam question for Salesforce's DEX-450 exam
Question #: 50
Topic #: 7
[All DEX-450 Questions]

A developer creates a custom controller and a custom Visualforce page by using the code block below:

public class MyController {

public String myString {

get {

if (myString == null) { myString = 'a';

}

return myString;

} private set; } public string getMyString (){

return 'getMyString';

} public string getStringMethod () {

if (myString == null) {

myString = 'b';

} return myString;

}

} {!StringMethod}, {!myString}, {!myString}

What can the user expect to see when accessing the custom page?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

0/2000 characters
Carin
4 months ago
Really? I thought it would be more complicated than that!
upvoted 0 times
...
Marya
4 months ago
I disagree, it should show B, b, b instead.
upvoted 0 times
...
Rosalind
4 months ago
Wait, isn't myString set to 'b' in getStringMethod?
upvoted 0 times
...
Jaime
4 months ago
I think the output will be A, a, a.
upvoted 0 times
...
Jennifer
4 months ago
The controller initializes myString to 'a' first.
upvoted 0 times
...
Ciara
5 months ago
I practiced a similar question, and I feel like the `getStringMethod` would return 'b' if called, but I'm confused about the order of execution here.
upvoted 0 times
...
Johnna
5 months ago
I'm not entirely sure, but I remember something about how private setters work. Could that change what gets displayed?
upvoted 0 times
...
Antonio
5 months ago
I think the first time the page loads, `myString` will be initialized to 'a', so that might affect the output.
upvoted 0 times
...
Maryanne
5 months ago
I believe the output should be A, b, getMyString, but I’m not completely confident about the initial value of `myString`.
upvoted 0 times
...
Walker
5 months ago
Hmm, I'm a bit unsure about this one. I know ITSI is an important Splunk app, but I'm not entirely clear on the deployment specifics. I'll have to think this through carefully.
upvoted 0 times
...
Glory
5 months ago
I remember discussing the costs associated with licensing mobile apps and that it might be a disadvantage. But weren't there also other factors, like training employees?
upvoted 0 times
...

Save Cancel