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

How many ways can an argument be passed to a subroutine and explain them?

965


Can we call thread start () twice?

911


Can we use switch statement with strings?

991


What is a buffer in java?

973


Explain inheritance in java?

930


What is the collection interface?

976


Write a program to find maximum and minimum number in array?

941


What is the main functionality of the remote reference layer?

1945


What is Java Shutdown Hook?

1119


Explain about core java?

1061


What is an empty string in css?

980


Which class cannot be a subclass in java?

955


What is type inference in java8?

980


Explain the JDB in depth & command line.

961


How does list work in java?

865