p37 1.java ant详解 练习8 /** * Created by xkfx on 2017/2/26. */ class A { static int i = 47; } public class TestStatic { public static void main(String[] args) { A a1 = new A(); A a2 = new A(); A a3 = new A(); a2.i++; a3.i++; System.out.println(a1.i); //…
System (1)这个类中有很多可以获取系统信息的类. public class SystemLearn { public static void main(String[] args) { long time = System.currentTimeMillis(); Date date = new Date(time); SimpleDateFormat sdf = new SimpleDateFormat(''MM月dd日''); String time_temp = sdf.forma…
第六天 30.(219) Contains Duplicate II JAVA class Solution { public boolean containsNearbyDuplicate(int[] nums, int k) { Map<Integer,Integer> map = new HashMap<Integer,Integer>(); for(int i =0;i<nums.length;i++){ if(map.containsKey(nums[i])) if…