摘要:
class Employee { private int emp_id; private String emp_name; private float emp_salary; Employee() { } public Employee(int emp_id, String emp_name, float emp_salary) { this.emp_id = emp_id; this.emp_name = emp_name; this.emp_salary = emp_salary; } public ... 阅读全文
摘要:
class Employee { private int emp_id; private String emp_name; private float emp_salary; public Employee(int emp_id, String emp_name, float emp_salary) { this.emp_id = emp_id; this.emp_name = emp_name; this.emp_salary = emp_salary; } public String toString() { ... 阅读全文
摘要:
//二维数组排序 int[][] seq_int = { {1,342,54,24,545}, {4,5433,75,53,775}, {2,62,73,7445,673}, {6,90,954,193,2012} }; for(int[] row : seq_int){ Arrays.sort(row); } for (int i=0; i<seq_int.length... 阅读全文
摘要:
int[] myAry = {0,1,3,4,6,87,3,2,4,34,34,7,45}; int[] myAry2 = myAry; int[] myAry3 = Arrays.copyOf(myAry, myAry.length); if(myAry == myAry2){ System.out.println("myAry 和 myAry2 相等"); }else{ System.out.println("myAry 和 myAry2 不相等"); } ... 阅读全文
摘要:
//二维数组排序 int[][] seq_int = { {1,342,54,24,545}, {4,5433,75,53,775}, {2,62,73,7445,673}, {6,90,954,193,2012} }; for(int[] row : seq_int){ Arrays.sort(row); } System.out.println(Arrays.dee... 阅读全文