Hi,
I have a question. I have written two
java files.
1).
a.java as
package CertificationPractice.Package1;
public class a
{
public static
String doRooThings()
{
System.out.println("Lol");
return null;
}
}
and
b.java as
package CertificationPractice.Package2;
import CertificationPractice.Package1.a;
class b extends a
{
public static void main(String args[])
{
System.out.println(
doRooThings());
}
}
Now, if U can see in b.java, I am calling the inherited method
doRooThings() but I have not created objects for either of the classes. So how is this possible? Both the files are compiling fine and b.java is running fine too.
Thanks