if a class dosen;t have any access specifier, what is the default access specifier for it.....??
and as said in the thread above, what is a package access scope???
If a class doesn't have any access modifier attached to it then it will have DEFAULT access modifier. The package scope is nothing but you will have access to the constuctors and methods of other classes if accessing class is in a same package.
i've one more doubt....
they say that a class can only be extended if the extending class is in the same package or if we import the class to be extended..am i right???
You are right if the extending class has a default access modifier to it. But say the extending class has a public access modifier then you can extend that class even if it's in a different package.
then if we write two classes in same file(one class extending the other) and define one variable with default access in the base class, can this be accessed by the derived class???
Yes you can access the variables defined in the parent class. Once a child class extends the parent class, chld class can do everything which a parent class can do, but it's not true the other way round.
i more doubt...
is it true that default cnstrtr takes the acess specification from its enclosing class in every case???
A default constructor always has a default access in a class and it doesn't inherit anything by extending a class. You can changes the access modifier of a constructor then it;s not a deault constructor anymore.