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

What is jee6?

539


When should I use singleton pattern?

546


How many bits is a string?

525


What is method and methodology?

608


How many types of memory areas are allocated by jvm?

564






What is externalizable interface?

583


What does nullpointerexception mean?

617


What is difference between final and immutable?

561


What do you understand by garbage collection in Java? Can it be forced to run?

555


what is instanceof operator used in java?

597


What do you mean by Function Overloading in java?

632


What is main in java?

515


What is the difference between the boolean & operator and the && operator in java programming?

567


Can private class be extended java?

571


What is the platform?

538