1.2.1
public class cjava { public static void main(String[]args) { int a,b; a='A'; b='B'; System.out.println("a="+a+"b="+b); } }
2.2
public class cjava { public static void main(String[]args) { char a,b; a='a'; b='b'; a=(char)(a-32); b=(char)(b-32); System.out.println("a="+a+"b="+b); } }
2.3
public class cjava { public static void main(String[]args) { final int s=10; int a,b; a=10; b=a*s; System.out.println("b="+b); } }
2.4
public class cjava { public static void main(String[]args) { double a; int b; a=9.2; b=(int)a; System.out.println("b="+b); } }
2.5
public class cjava {
public static void main(String[]args) {
short a;
short b=-1;
a=b;
System.out.println("a="+a);
}
}
2.无问题
3.明天继续写例题。