Java: Can a class inherit from two super classes at the same time?
问题 I have a class Journey which I want to make a superclass and another class plannedjourney. The plannedjourney class extends JFrame since it contains forms..However I also want this class to extends Journey.. Is there a possible way to do this? 回答1: Don't mix models and views. If you keep both domains clearly separated, then you won't be in need of multiple inheritance (this time). You have one model class for journeys and a viewer for such journeys. The viewer should subclass Component and be