Java tutorial
//package com.java2s; import java.util.Random; public class Main { public static final String encodeInterfereWord(String src) { String base = "abcdefghijklmnopqrstuvwxyz0123456789"; Random random = new Random(); StringBuffer sb = new StringBuffer(); int len = base.length(); for (int index = 0, size = src.length(); index < size; index++) { sb.append(base.charAt(random.nextInt(len))); sb.append(src.charAt(index)); } sb.append(base.charAt(random.nextInt(len))); return sb.toString(); } }