摘要:
1 package 彩票中奖码生成器; 2 3 import java.util.Random; 4 5 public class TestRandom { 6 public static void main(String[] args) { 7 Random random=new Random() 阅读全文
摘要:
1 package math; 2 3 public class TestMath_round { 4 public static void main(String[] args) { 5 System.out.println(Math.round(0.5));//1 6 System.out.pr 阅读全文
摘要:
1 package 对象克隆; 2 class A implements Cloneable{//要具备clone()功能必须要实现Cloneable接口,此接口里无方法,只起标识作用。 3 private String value; 4 public A(String value){ 5 this 阅读全文
摘要:
1 package 对象被回收前执行的操作; 2 class A{ 3 @Override 4 protected void finalize() throws Throwable { 5 System.out.println("在对象变成垃圾被gc收回前执行的操作。"); 6 } 7 } 8 pu 阅读全文
摘要:
1 public class Test_currentTimeMillis { 2 public static void main(String[] args) { 3 long start=System.currentTimeMillis(); 4 for(int i=0;i<Integer.MA 阅读全文