java 中生成随机验证码

1.导包

2.

public void generateVCode() throws FileNotFoundException, IOException
	{
		VerifyCode verifyCode=new VerifyCode();
		BufferedImage bi=verifyCode.getImage();
		System.out.println(verifyCode.getText());
		VerifyCode.output(bi, new FileOutputStream("E:/a.jpg"));
	}

  

posted on 2017-07-08 16:05  lkjhgfdsa123  阅读(86)  评论(0编辑  收藏  举报