Skip to content

brunosdecampos/java-class-structures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java Class Structures

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.

Invoice Class

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.

Date Class

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.

About

Package private class structure in Java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages