| | |
| | | Map<String, Object> dataResult = new HashMap<>(); |
| | | dataResult = data; |
| | | int a21026D =(int) Math.round(Double.parseDouble(data.get("a21026").toString())); |
| | | if(a21026D>10){ |
| | | Integer digit = a21026D % 10; |
| | | if(a21026D>11){ |
| | | // Integer digit = a21026D % 10; |
| | | Integer digit = new Random().nextInt(5)+8; |
| | | dataResult.put("a21026",Double.parseDouble(digit.toString())); |
| | | }else { |
| | | continue; |
| | |
| | | return true; |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | for(int i = 0;i<10;i++){ |
| | | //选定随机数的生成区间为7~15 |
| | | //15-7=8 |
| | | //8+1=9 |
| | | int number = new Random().nextInt(5)+8; |
| | | //随机数结果加上最初的首个数字 |
| | | System.out.println(number); |
| | | } |
| | | } |
| | | } |