摘要:
import java.util.Scanner; public class day_3 { public static void main(String[] args) { //switch 语句 /*格式 switch(表达式){ case 取值1: 语句体; break; case 取值2: 阅读全文
摘要:
public class day_2_3 { public static void main(String[] args) { /* if语句 */ int i = 1; int j = 1; //三元运算 int max = i > 2 ? i : 2; // if表达式 if (i > j) { 阅读全文
摘要:
//运算符 public class day2 { public static void main(String[] args) { int a = 3; int b = 2; // 加号运算符 System.out.println("a+b="+(a+b));// 代码计算括号的优先级高于字符串 阅读全文
摘要:
java 变量 2大类4小类8小种 基本数据类型 整型 byte short int long 浮点型 float double 字符型 char 布尔型 boolean 引用数据类型 (未学) public class day1 { public static void main(String[] 阅读全文