if there is a class A in which main class is defined,and there is another class B which extends the class A.now if I save the file as B.java, then is that programme run or not?
By in OOP/OOD on Sep 09 2007
  • Praveen Dhatrika
    Jan, 2016 22

    YES

    • 0
  • satyanand kumar
    Feb, 2008 14

    yes it can but the thing is you must not to give class A is public modifier because file can save with the name of public class only after compilation it will will two files for each class A and class B and class B must be declared as public

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS