clone(序列化方式深复制)

 package com.ygl; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.Object...

2016-01-31 10:51:09

阅读数:164

评论数:0

get和post区别

 get和post区别 1、传输方式不同,get在request-line中传输(即在URL中传输)、post在request-line及 request-body中传输(可认为隐藏传输) 2、get传输长度有限,一般在IE中是2083 opera 4050 另一方面服务器端也加入限制 ...

2016-01-31 10:27:31

阅读数:127

评论数:0

clone(深复制)

package com.ygl.annotion; public class TestClone {       public static void main(String[] args) { Teacher teacher=new Teacher(); teacher.setA...

2016-01-30 22:50:38

阅读数:123

评论数:0

clone(浅复制)

package com.ygl.annotion; public class TestClone {       public static void main(String[] args) { Teacher teacher=new Teacher(); teacher.setA...

2016-01-30 22:45:18

阅读数:89

评论数:0

clone

package com.ygl; public class CloneTest {      public static void main(String[] args) { Student student=new Student(); student.setAge(26); s...

2016-01-30 22:31:24

阅读数:121

评论数:0

线程中if的陷阱

package com.ygl; public class Simple {     private int number;//有两个线程时运行不出错,但有四个线程时会出错。假设1、2为增线程,3、4为减线程     public synchronized void increase()     ...

2016-01-30 21:51:15

阅读数:156

评论数:0

局部的变量与成员变量对线程的影响

package com.ygl; public class HelloThread { public static void main(String[] args) { Runnable r=new ThreadH(); Thread t1=new Thread(r); Thre...

2016-01-30 14:30:39

阅读数:138

评论数:0

线程名字

public Thread() { init(null, null, "Thread-" + nextThreadNum(), 0);     }   private void init(ThreadGroup g, Runnable target, St...

2016-01-30 11:56:51

阅读数:147

评论数:0

抓包

1.只抓跟自己MAc地址有关的包 2.自定义显示过滤

2016-01-28 22:08:21

阅读数:173

评论数:0

junit(七)

 package com.ygl; public class Calculator {    public  int add(int a,int b){     try {   Thread.sleep(500);  } catch (InterruptedException e)...

2016-01-24 23:12:03

阅读数:124

评论数:0

junit(六)

 package com.ygl; public class Calculator {    public  int add(int a,int b){     try {   Thread.sleep(500);  } catch (InterruptedException e)...

2016-01-24 23:10:51

阅读数:124

评论数:0

junit(五)TestSuite

package com.ygl; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; public class TestAll extends TestCas...

2016-01-24 21:53:24

阅读数:195

评论数:0

junit(四)

 package com.ygl; public class Calculator {    private  int add(int a,int b){     return a+b;    }    } //********************************...

2016-01-24 21:37:13

阅读数:108

评论数:0

junit(三)

 package com.ygl; import java.io.File; public class DeleteAll {     public static void deleteAll(File file){      if(file.isFile()||file.list(...

2016-01-24 21:29:53

阅读数:140

评论数:0

junit(二)

 package com.ygl; public class Calculator {    public int add(int a,int b){     return a+b;    }       public int subtract(int a,int b){  ...

2016-01-24 17:27:40

阅读数:137

评论数:0

junit(一)

package com.ygl; public class MyStack {   private String [] elements;   private int nextIndex;   public MyStack(){    elements=new String [100];    n...

2016-01-24 17:26:38

阅读数:114

评论数:0

线程condition(二)控制线程通知

package com.ygl; public class CommunicationRunnable2 implements Runnable{ private Business business; public CommunicationRunnable2() { } p...

2016-01-20 21:50:56

阅读数:155

评论数:0

线程condition

 package com.ygl; import java.util.concurrent.locks.Condition; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.Reentr...

2016-01-20 21:33:42

阅读数:143

评论数:0

ReadWriteLock rwl = new ReentrantReadWriteLock();读写锁

class CachedData { Object data; volatile boolean cacheValid; ReadWriteLock rwl = new ReentrantReadWriteLock(); void processCachedData() ...

2016-01-19 22:48:46

阅读数:144

评论数:0

Callable拿到线程执行结果

package com.ygl; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorSer...

2016-01-17 15:56:54

阅读数:216

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭