StringBuilder sb = new StringBuilder(); for(int i = 0 ;i < 3; i++){ sb.append((char) (0x4e00 + (int) (Math.random() * (0x9fa5 - 0x4e00 + 1)))); } vars.put("name",sb.toString());