实现鼠标连点效果
import java.awt.*;
import java.awt.event.InputEvent;
public class ShuBiaoLianDian {
public static void main(String[] args) throws AWTException {
try {
int i=0;
//鼠标点击次数
while(i<100000) {
Robot robot = new Robot();
robot.delay(100);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.delay(100);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
++i;
}
} catch (AWTException e) {
e.printStackTrace();
}
}
}
去除JSON中空格
public class ToPureJson {
//去json空格
public static String ToPureJson(String NoPureJson) {
String start="";
char[] middle=start.toCharArray();
String end="";
for (int i=0 ; i<start.length();i++){
if (middle[i]!=32&&middle[i]!=10){
end+=middle[i];
}
};
return end;
}
}