Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is a default package ?

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


Please Help Members By Posting Answers For Below Questions

What is the purpose of nested class in java?

1089


What is autoboxing and unboxing?

1009


How to call one constructor from the other constructor ?

1069


How many types of classes are there in java?

1055


What Is Composition?

1058


Why hashset is used in java?

1080


What is starvation?

1323


Can we print null in java?

1062


What is outofmemoryerror in java?

1031


What is java virtual machine and how it is considered in context of java’s platform independent feature?

1175


What is Java Reflection API? Why it’s so important to have?

1165


What are scalar data types?

1072


Is node a data type in java?

1011


Is java still necessary?

1084


Does java return by reference?

1015