What is a valid statement about Apex classes and interfaces in java?
Change Image Delete
1. The default modifier for a class is private. 2. Exception classes must end with the word exception. 3. A class can have multiple levels of inner classes. 4. The default modifier for an interface is private.
This question has two answers: both 1 and 2 are correct. When considering which of the choices listed above that would be a valid statement about Apex classes and interfaces in java, the default modifier for a class is private is the answer that jumps out to me first since the default modifier for inner classes are private.
The second answer which is also a valid statement about Apex classes and interfaces in Java is that exception classes must end with the word exception. This is the way for the program to be able to identify that a class is an exception class and not an ordinary class. You can learn all about this topic and find answers to other questions in the Java section.