public class List {
public static void main(String[] args) {
String s = "abc nnn ooo/xzsxc bs";
System.out.println("原字符串:"+s);
System.out.println();
String a[] = s.split(" ");
ArrayList b = new ArrayList();
for (int i = 0; i < a.length;i++){
b.add(a[i]);
System.out.println(a[i]);
}
System.out.println();
for( int i=0;i<a.length;i++ ){
a[i] = a[i].replaceAll(a[i],"/"+ a[i] + "/");
System.out.println(a[i]);
}
}
}