java: playing around with final statement for local flags