Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam Platform Developer I Topic 1 Question 97 Discussion

Actual exam question for Salesforce's Platform Developer I exam
Question #: 97
Topic #: 1
[All Platform Developer I Questions]

The orderHelper class is a utility class that contains business logic for processing orders. Consider the following code snippet:

A developer needs to create a constant named delivery_multiplier with a value of 4.15. The value of the constant should not change at any time in the code.

How should the developer declare the delivery multiplier constant to meet the business objectives?

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Michell
1 months ago
I don't know, maybe the developer could just use a magic spell to make the constant value unalterable. Something like 'Constantius Fixius' should do the trick!
upvoted 0 times
...
Halina
1 months ago
I'll have to go with option A. It's the simplest declaration and still ensures the value won't change, right? Wait, why is that not the correct answer? *scratches head*
upvoted 0 times
...
Sharen
1 months ago
Hmm, this is a tricky one. I'm torn between options B and C. Both seem to meet the criteria, but I'm leaning towards C since it's more commonly used in Java.
upvoted 0 times
Rosina
13 days ago
I think option C is the correct choice. It uses 'final' to ensure the value doesn't change.
upvoted 0 times
...
...
Doyle
1 months ago
I'm going with option B. The 'constant' keyword ensures the value cannot be changed, which is exactly what the business requirement calls for.
upvoted 0 times
Rodrigo
18 hours ago
User1: I think option B is the correct choice.
upvoted 0 times
...
...
Phuong
2 months ago
I think option C is the correct answer. The constant should be declared as static final to ensure it cannot be modified throughout the code.
upvoted 0 times
Jerrod
13 days ago
Definitely, static final is the best choice for constants in Java.
upvoted 0 times
...
Kattie
28 days ago
Static final is the way to go for constants that should not change.
upvoted 0 times
...
Willow
1 months ago
I agree, using static final ensures the value remains constant.
upvoted 0 times
...
Harrison
2 months ago
Option C is correct. It should be declared as static final to prevent changes.
upvoted 0 times
...
...
Novella
2 months ago
I'm not sure, but I think option A) static decimal DELIVERY_MULTIPLIER = 4.15; could also work. It's static and has the correct value.
upvoted 0 times
...
Alpha
2 months ago
I agree with Crista. Using static final ensures that the value remains constant throughout the code.
upvoted 0 times
...
Crista
2 months ago
I think the correct answer is C) static final decimal DELIVERY_MULTIPLIER = 4.15; because we want the value to be constant and not change.
upvoted 0 times
...

Save Cancel