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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
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

Post by answerhappygod »

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?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply