public class StringTest
{
public static void main(String args[])
{
System.out.println("abc");
String cde = "cde";
System.out.println("abc" + cde);
String c = "abc";
c = c.substring(2,3);
System.out.println("c = " + c);
String d = cde.substring(1, 2);
System.out.println("d = " + d);
}
}
程序运行显示结果如下:
abc
abccde
c = c
d = d |
|