例4-18和例4-19
public class Example4_18{
public static void main(String args[]){
char a[]={'a','b','c','D','E','F'};
for(int i=0;i<a.length;i++){
if(Character.isLowerCase(a[i])){
a[i]=Character.toUpperCase(a[i]);
}
else if(Character.isUpperCase(a[i])){
a[i]=Character.toLowerCase(a[i]);
}
}
for(int i=0;i<a.length;i++){
System.out.printf("%6c",a[i]);
}
}
}
public class Example4_19{
public static void main(String args[]){
Integer m[]=new Integer[10];
for(int i=0;i<m.length;i++){
m[i]=new Integer(101+i);
}
for(int i=0;i<m.length;i++){
System.out.println(m[i].intValue());
}
}
}