Question 11
Given the code fragment: Which set of class definitions compiles?
- interface Story extends SInt {} interface Art extends SInt {}
- public interface Story extends SInt {} public interface Art extends SInt {}
- sealed interface Story extends SInt {} non-sealed class Art implements SInt {}
- non-sealed interface Story extends SInt {} non-sealed interface Art extends SInt {}
- non-sealed interface Story extends SInt {} class Art implements SInt {}
Question 12
Given: What is the result?
- mA
- mB mA
- mB
- mB mC
Question 13
Given the code fragment: What is the result?
- ABBCDE // the order of elements is unpredictable
- ABCDE
- ABCDE // the order of elements is unpredictable
- ADEABCB // the order of elements is unpredictable
Question 14
Given: What is the result?
- {bicycle=7, car=7, motorcycle=7, truck=7}
- {3:bicycle, 0:car, 6:motorcycle, 5:truck}
- Compilation fails.
- {bicycle=1, car=3, motorcycle=1, truck=2}
- {bicycle, car, motorcycle, truck}
Question 15
Which statement is true about modules?
- Only unnamed modules are on the module path.
- Automatic and named modules are on the module path.
- Only automatic modules are on the module path.
- Only named modules are on the module path.
- Automatic and unnamed modules are on the module path.