int x=1;
int y=2;
if (x %2==0) {
y++;
} else {
y--;
}
System.out.println("y="+y);
public class Test01 {
public static void main(String[] args) {
byte b= 3;
b=b+4;
System.out.println("b="+b);
}
}
public class Test02 {
public static void main(String[] args) {
int x=12;
{
int y=96;
System.out.println("x is "+x);
System.out.println("x is "+y);
}
y=x;
System.out.println("x is "+x);
}
}
public class Test02 {
public static void main(String[] args) {
int x=4,j=0;
switch (x) {
case :1
j++;
case :2
j++;
case :3
j++;
case :4
j++;
case :5
j++;
default:
j++;
}
System.out.println(j);
}
}
public class Test02 {
public static void main(String[] args) {
int n=9;
while (n>6) {
System.out.println(n);
n--;
}
}
}
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |