Hi Every one
I saw this phenomenon as i was explaining some
java code about multithreading to my friend today.
If i write a class A and class B with default access specifiers, I can call the construtor of one of the class in the other by writing "new" before it. Here is what I did to check it out.
class A
{
A()
{
system.out.println("Inside class A");
}
dummy()
{
system.out.print("dum dum");
}
}
class B
{
new A(); //calling the constructor!!!
}
So that is the code and i would be very greatfull if i can get and explanation about it from someone.
Regards
AbdulWajed