Which syntax should you use to create a new public class named MyNewClass? -> Public class MyNewClass {} -> Class public MyNewClass {} -> Class MyNewClass {} public -> MyNewClass public {} class.
Click on the arrows to vote for the correct answer
A. B. C. D.A.
The correct syntax to create a new public class named MyNewClass is:
A. Public class MyNewClass {}
Explanation:
Therefore, the correct answer is A. Public class MyNewClass. Options B, C, and D are not relevant to the question as they refer to other Apex concepts.
In summary, when creating a new public class in Apex, the correct syntax is "public class ClassName {}", where "public" is the access modifier, "class" is the keyword to define a class, and "ClassName" is the name of the class.