This is a simple package private class structure in Java. For those who are starting Java, this is a very important step. Understanding your access modifiers in Java are fundamental to implement package privates classes or methods.
Creating a class called Invoice that a hardware store might use to represent an invoice for an item sold at the store. The method getInvoiceAmount calculates the invoice amount and returns the amount as a double value. InvoiceTest is a test application that demonstrates class Invoice’s capabilities.
Creating a simple class called Date that includes three instance variables—a month, a day and a year. It provides a method displayDate that displays the month, day and year separated by forward slashes. DateTest is a test application that demonstrates class Date’s capabilities.