Example code from my advanced Java programming lecture