Answer Posted / vishwanath
A default package is the package, which a java class
belongs to, when theres no explicit package statement like
package foo;
----------
eg:
This class below is set to belong to the default package.
class Foo
{
}
-------------
Design considerations:
Its not a good design choice though to have it this way,
a java class belonging to the default package
Reason:
1) Bad modularizing
2) problems with access specifiers arise
etc...
Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
What is the difference between exception and error in java?
What is difference between next () and nextline () in java?
What’s the difference between constructors and other methods?
how do I create a runnable with inheritance? : Java thread
Is string thread safe in java?
what is anonymous class in java?
Why is flag used in java?
Difference between error and exception
How does thread synchronization occurs inside a monitor? What levels of synchronization can you apply?
What is the purpose of final keyword and when to use it?
What one should take care of, while serializing the object?
What data type is string java?
Is arraylist zero based?
What does the “static” keyword mean?
What is the base class for error and exception?