Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam CRT-450 All Questions

View all questions & answers for the CRT-450 exam

Exam CRT-450 topic 1 question 233 discussion

Actual exam question from Salesforce's CRT-450
Question #: 233
Topic #: 1
[All CRT-450 Questions]

Which two statements are valid regarding Apex classes and interfaces? (Choose two.)

  • A. Classes are final by default.
  • B. Interface methods are public by default.
  • C. Inner classes are private by default.
  • D. A class can only have one inner class level.
Show Suggested Answer Hide Answer
Suggested Answer: BD 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
noox
Highly Voted 2 years, 10 months ago
According to : https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_keywords_final.htm A is correct : "Methods and classes are final by default." According to : https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_defining.htm C is correct : "The private access modifier declares that this class is only known locally, that is, only by this section of code. This is the default access for inner classes." D is correct : "You can only have inner classes one level deep." And according to : https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_access_modifiers.htm B is false : "Interface methods have no access modifiers. They are always global." There it is boys :)
upvoted 8 times
...
Ke_James0302
Most Recent 1 month, 1 week ago
Selected Answer: BC
B and C
upvoted 1 times
...
irina_735
1 year ago
Selected Answer: CD
A, C, D are correct. But C and D seems to be more appropriate
upvoted 1 times
...
ArthuriusII
1 year, 9 months ago
CD https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_defining.htm
upvoted 2 times
...
illyaOsiyuk
2 years, 11 months ago
ACD are right answers, so what should I choose?
upvoted 3 times
...
[Removed]
3 years, 1 month ago
My mistake. Correct answers: A and C Methods and classes are final by default. You cannot use the final keyword in the declaration of a class or method. This means they cannot be overridden. Use the virtual keyword if you need to override a method or class. Interface methods are always global not public
upvoted 4 times
DonAldos
3 years ago
I agree with that!
upvoted 1 times
...
MuzaffarMoiz
3 years ago
B and D is correct
upvoted 1 times
...
...
[Removed]
3 years, 1 month ago
B and C This is the default access for inner classes—that is, if you don't specify an access modifier for an inner class, it is considered private.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...