随笔分类 - Java
摘要:static int[][] seq_int = { {2349,12,420,549,120,3,23}, {1,30,84,693,29,4,4}, {7,239,943,82,32,492}, {2,4,234,5920,2019,40234}, {5,603,582,6928,923752,234}, {9,509,2392,95,102,402,2} }; public static void main(String[] args) ...
阅读全文
摘要:class Scope{ private int x; public int getX() { return x; } public void setX(int x) { this.x = x * 3; }}public class ScopeTest extends Scope{ public static void main(String[] args) { int a = 100; Scope se = new Scope(); se.setX(a); System.o...
阅读全文
摘要: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...
阅读全文

浙公网安备 33010602011771号