test.java
来自「替换jsp中的中文为sturts中的bundle」· Java 代码 · 共 62 行
JAVA
62 行
package com.pengjj.test;
import java.util.Random;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* <p>Title: 彭家军</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c)2006</p>
* <p>Company: digitalchina</p>
* @author: pengjja 2006-04-05
* @version: 1.0
*/
public class Test {
private static Random rnd = new Random();
public static void main(String[] args) {
StringBuffer word = null;
switch(rnd.nextInt(2)) {
case 1:
word = new StringBuffer("P");
break;
case 2:
word = new StringBuffer("G");
break;
default:
word = new StringBuffer("M");
break;
}
word.append('a');
word.append('i');
word.append('n');
System.out.println(word);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?