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
What is difference between == equals () and compareto () method?
What is a module function?
Which are the two subclasses under exception class?
What is a boolean flag in java?
How to remove the trailing spaces from a string?
Why do we declare a class static?
What is api data?
What happens when you invoke a thread’s interrupt method while it is sleeping or waiting?
What's the access scope of protected access specifier?
what is aggregation in java?
Can you override static methods?
What is the point of java?
What are different exception types exceptions available in java ?
What happens when a thrown exception is not handled?
Why hashset is used in java?