Code examples for mastering Java