Learning Java through simple programs