Java: Effect