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
Why does java have different data types for integers and floating-point values?
What is classname class in java?
What is the difference between this() and super() in java?
What is the instance of an object?
What is a key in java?
Do I need java on my computer?
How do generics work in java?
What is a two-pass assembler?
Can I use % with real numbers?
When is the arraystoreexception thrown?
What’s the difference between constructors and other methods?
What is the main advantage of passing argument by reference?
Why do we need hashmap in java?
What is a get method?
Explain the public class modifier?