优化代码

This commit is contained in:
RuoYi
2025-03-14 15:35:33 +08:00
parent 45d8fe0c16
commit b1a4884c89
3 changed files with 7 additions and 8 deletions

View File

@@ -21,7 +21,7 @@ public class KaptchaTextCreator extends DefaultTextCreator
int x = random.nextInt(10);
int y = random.nextInt(10);
StringBuilder suChinese = new StringBuilder();
int randomoperands = (int) Math.round(Math.random() * 2);
int randomoperands = random.nextInt(3);
if (randomoperands == 0)
{
result = x * y;