1, 比较运算符, 比 g和103是否相等???
代码:
public class bj{
public static void main(String[] args){
char q = 'g';
int w = 103 ;
if(q == 103){
System.out.println("g和103是相等的");
}else{
System.out.println("g和103是不相等的");
}}
}
2,for循环,输出ABCDE
代码:
public class vr{
public static void main(String[] args){
for(int q = 1;q<=5;q++){
char q1 =(char)(q+64);
System.out.println(q1);
}
}
}
标签:java,编程,System,char,println,103,public,out From: https://blog.csdn.net/2401_86416873/article/details/140595005