concept these exercise in category java

This is an excerpt from Manning's book OCA Java SE 8 Programmer I Certification Guide.
Chapters 1 through 7 include multiple Twist in the Tale exercises. The answers to these exercises, along with comprehensive explanations, are given in this appendix. The answers to each exercise include the following elements:
When you define a public class or an interface in a Java source file, the names of the class or interface and Java source file must match. Also, a source code file can’t define more than one public class or interface. If you try to do so, your code won’t compile, which leads to a small hands-on exercise for you that I call Twist in the Tale, as mentioned in the preface. The answers to all these exercises are provided in the appendix.