package in Kotlin

Classes and functions in Kotlin are grouped into packages. Putting code into packages is useful for two main reasons:
* It lets you organize your code.You can use packages to group your code into specific kinds of functionality, like data structures or database stuff.
* It prevents name conflicts.If you write a class named Duck, putting it into a package lets you differentiate it from any other Duck class that may have been added to your project

The package declaration tells the compiler that everything in the source file belongs in that package. If the source file has no package declaration, the code is added to a nameless default package. Your project can contain multiple packages, and each package can have multiple source files. Each source file, however, can only have one package declaration.
```
package com.hfkotlin.mypackage
```
When you add a class to a package, it’s fully qualified name is the name of the class prefixed with the name of the package. So if com.hfkotlin.mypackage contains a class named Duck, the fully qualified name of the Duck class is com.hfkotlin.mypackage.Duck. You can still refer to it asDuck in any code within the same package, but if you want to use the class in another package, you have to provide the compiler with its full name.There are two ways of providing a fully qualified class name: by using its full name everywhere in your code, or by importing it. And if there’s a class name conflict, you can use the as keyword.
```
import com.hfkotlin.mypackage.Duck
import com.hfkotlin.myanotherpackage.Duck as Duck2
```