What is default specifier ??? Use of default specifier ???

Answer Posted / hemanta paudel

Java provide a default access specifier which is apply when
programmer does not use other specifier.

The default specifier allow to access only with in the same
package. If class A and class B are in same package
(Mypackage) then class A can access class B and vice-verse.

class A
{
-----------
----------
---------
}

class B
{
A a=new A();
--------
--------
}

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do loops java?

560


What does singleton mean in java?

520


What checkbox method allows you to tell if a checkbox is checked?

554


What is the main purpose of java?

534


What is the byte order of byte buffer?

573






What about method local inner classes or local inner classes in java?

564


Which method must be implemented by all threads?

734


Is nullpointerexception checked or unchecked?

561


Can a class have a static inner class?

616


os is developed in c no java is more secured then c na why dont the os developed is developed using java

3537


Which types of exceptions are caught at compile time?

573


What are the steps that are followed when two computers connect through tcp?

530


why are wait(), notify() and notifyall() methods defined in the object class? : Java thread

560


What is static method with example?

627


How can constructor chaining be done by using the super keyword?

626