Halloween Special 2026! Get Up to 25% OFF Practice Questions! Limited Time - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce DEX-450 Exam - Topic 7 Question 50 Discussion

Posted by Fabiola on May 08, 2022 at 04:29 PM

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?

Suggested Answer: A

Get Premium DEX-450 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
11 comments · newest first
CA
Carin 12 months ago
Really? I thought it would be more complicated than that!
MA
Marya 12 months ago
I disagree, it should show B, b, b instead.
RO
Rosalind 12 months ago
Wait, isn't myString set to 'b' in getStringMethod?
JA
Jaime 1 year ago
I think the output will be A, a, a.
JE
Jennifer 1 year ago
The controller initializes myString to 'a' first.
CI
Ciara 1 year 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.
JO
Johnna 1 year ago
I'm not entirely sure, but I remember something about how private setters work. Could that change what gets displayed?
AN
Antonio 1 year ago
I think the first time the page loads, `myString` will be initialized to 'a', so that might affect the output.
MA
Maryanne 1 year ago
I believe the output should be A, b, getMyString, but I’m not completely confident about the initial value of `myString`.
WA
Walker 1 year 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.
GL
Glory 1 year 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?
0/2000 characters

Save Cancel