Salesforce Platform Developer I (legacy) — Question 197

Which code statement includes an Apex method named updateAccounts in the class AccountController for use in a Lightning web component?

Answer options

Correct answer: B

Explanation

Option B is correct because it correctly specifies the path to the Apex method using the required syntax for importing Apex methods in Lightning web components. The other options either omit the correct namespace ('@salesforce/apex') or incorrectly format the import statement, making them invalid for this context.