some common java Tips and cases