上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 24 下一页
摘要: 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() 阅读全文
posted @ 2017-04-07 21:00 xiongjiawei 阅读(2025) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-04-07 20:21 xiongjiawei 阅读(438) 评论(0) 推荐(0) 编辑
摘要: 1 package 对象克隆; 2 class A implements Cloneable{//要具备clone()功能必须要实现Cloneable接口,此接口里无方法,只起标识作用。 3 private String value; 4 public A(String value){ 5 this 阅读全文
posted @ 2017-04-07 20:03 xiongjiawei 阅读(1541) 评论(0) 推荐(0) 编辑
摘要: 1 package 对象被回收前执行的操作; 2 class A{ 3 @Override 4 protected void finalize() throws Throwable { 5 System.out.println("在对象变成垃圾被gc收回前执行的操作。"); 6 } 7 } 8 pu 阅读全文
posted @ 2017-04-07 19:28 xiongjiawei 阅读(1146) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-04-07 19:19 xiongjiawei 阅读(818) 评论(0) 推荐(0) 编辑
摘要: 1 package 多线程; 2 class Producer implements Runnable{ 3 private Data data; 4 public Producer(Data data){ 5 this.data=data; 6 } 7 @Override 8 public syn 阅读全文
posted @ 2017-04-06 21:18 xiongjiawei 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 1 package 多线程; 2 class A{ 3 public synchronized void say(B b){ 4 System.out.println("A说:你把你的本给我,我把我的笔给你!"); 5 b.get(); 6 } 7 public synchronized void 阅读全文
posted @ 2017-04-06 20:06 xiongjiawei 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 1 package com.tn.hashMap; 2 3 import java.util.HashMap; 4 import java.util.TreeSet; 5 6 public class HashMapDemo { 7 public static void main(String[] 阅读全文
posted @ 2017-03-26 20:36 xiongjiawei 阅读(460) 评论(0) 推荐(0) 编辑
摘要: 1 package com.tn.hashMap; 2 3 public class Student { 4 private String id; 5 private String name; 6 public Student(String id, String name) { 7 super(); 阅读全文
posted @ 2017-03-26 19:45 xiongjiawei 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1 package com.tn.treeSet; 2 3 public class Student { 4 private String name; 5 private int age; 6 public Student(){} 7 public Student(String name, int 阅读全文
posted @ 2017-03-26 15:57 xiongjiawei 阅读(557) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 24 下一页