摘要:
import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.Data...
阅读全文
posted @ 2016-10-27 21:46
woqiaoxun
阅读(300)
推荐(0)
摘要:
import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.FileInputStream; import java.io.File...
阅读全文
posted @ 2016-10-24 21:03
woqiaoxun
阅读(373)
推荐(0)
摘要:
public class ByteArrayTest { public static void main(String[] args) throws IOException { read(write()); } //read public static void read(byte[] b) throws IOException{ ...
阅读全文
posted @ 2016-10-23 21:40
woqiaoxun
阅读(210)
推荐(0)
摘要:
笨鸟没有发现自己笨,也没有先飞怎么办? 还好,现在发现自己是笨鸟也不算太晚,那就要加倍的加油了。 以后要早起学习,就算加班回来晚,早点睡觉,第二天早上也能学习。 早睡早起,最终目标是5点起来。加油!
阅读全文
posted @ 2016-10-23 19:45
woqiaoxun
阅读(193)
推荐(0)
摘要:
1.先看下四个静态变量 The system-dependent path-separator character, represented as a string for convenience. The system-dependent path-separator character. The
阅读全文
posted @ 2016-10-16 14:44
woqiaoxun
阅读(269)
推荐(0)
摘要:
public class MulitThreadShareData { public static void main(String[] args) { final ShareData1 data1 = new ShareData1(); new Thread(new Runnable() { public void ru...
阅读全文
posted @ 2016-10-03 08:57
woqiaoxun
阅读(2603)
推荐(0)
摘要:
为了凑字,把oracle文档里介绍ThreadLocal抄过来 This class provides thread-local variables. These variables differ from their normal counterparts in that each thread
阅读全文
posted @ 2016-10-02 18:51
woqiaoxun
阅读(192)
推荐(0)
摘要:
这个示例是网上烂大街的,子线程循环100次,主线程循环50次,但是我试了很多次,而且从网上找了很多示例,其实多运行几次,看输出结果并不正确。不知道是我转牛角尖了,还是怎么了。也没有大神问,好痛苦。现在记录在这里,等以后有时间看。
阅读全文
posted @ 2016-10-02 17:27
woqiaoxun
阅读(156)
推荐(0)
摘要:
(示例都是网上视频的) 假如两个线程同时调用一个方法输出字符串 输出: this is testokokokokokokthis is testokokokokokokthis is testokokothis is testkokokoktokokokokokokhis is testokokok
阅读全文
posted @ 2016-10-02 11:07
woqiaoxun
阅读(290)
推荐(0)
摘要:
1.Java线程基本概念 在操作系统中两个比较容易混淆的概念是进程(process)和线程(thread)。操作系统中的进程是资源的组织单位。进程有一个包含了程序内容和数据的地址空间,以及其它的资源,包括打开的文件、子进程和信号处理器等。不同进程的地址空间是互相隔离的。而线程表示的是程序的执行流程,
阅读全文
posted @ 2016-10-01 22:56
woqiaoxun
阅读(193)
推荐(0)