how to calculate crit chance in java\ code example Example: crit chance in java int percentage = ((int)(Math.random() * 100));