When you write a class in Java, the file name has to have the same name as the Java class. But there is a situation wher
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
When you write a class in Java, the file name has to have the same name as the Java class. But there is a situation wher
When you write a class in Java, the file name has to have thesame name as the Java class. But there is a situation where a moreclasses can be written in a Java file other than the one that isthe same as the file name. What is the rule about this? (note: wehaven’t gotten to Inner Classes in Java yet, so this answer won’tbe accepted)What’s the difference between this() and super()?Why is declaring a method abstract in a superclass better thanonly defining the method in the subclasses?