結果 : how to avoid class cast exception in java