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 purpose of nested class in java?
What is autoboxing and unboxing?
How to call one constructor from the other constructor ?
How many types of classes are there in java?
What Is Composition?
Why hashset is used in java?
What is starvation?
Can we print null in java?
What is outofmemoryerror in java?
What is java virtual machine and how it is considered in context of java’s platform independent feature?
What is Java Reflection API? Why it’s so important to have?
What are scalar data types?
Is node a data type in java?
Is java still necessary?
Does java return by reference?