Using Packages
A package is like a folder for similar elements that helps give a logical grouping to the files in your project.
For example, the kotlin.collections package contains classes to create and manage lists and sets.
Packages allow you to organize your project as it becomes more complex, and they also prevent naming collisions.
Create a package by right-clicking your src directory and selecting New → Package.
When prompted, name your package com.bignerdranch.nyethack. (You can name a package anything you like, but we prefer this reverse-DNS style that scales with the number of applications that you write.)
The package you created, com.bignerdranch.nyethack, is the top-level package for NyetHack. Including your files within ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access