What are packages in java? Explain the purposes of packages
A package is a grouping of related types providing access protection and name space management.
Suppose you write different classes, example: class Circle
{
}
class Square
{
}
class Triangle
{
}
Then, you may want these classes to be bundled together for reasons like access management or namespace management.