2
Reply

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?

17y
6.1k
0
Reply

    YES

    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