我们这一家

2013年7月10日

Java - 同步与锁

摘要: package cn.itcast;import java.util.Stack;class Foo{ private int x=100; public int getX(){ return x; } public int fix(int y){ x=x-y; return x; }}public class Test01 extends Thread { private Foo foo = new Foo(); public static void main(String[] args) {... 阅读全文

posted @ 2013-07-10 23:00 MaxNumber 阅读(200) 评论(0) 推荐(0)

Java - 多线程

摘要: 1 package cn.itcast; 2 3 import java.util.Stack; 4 5 class DoSomething implements Runnable { 6 private String name; 7 8 public DoSomething(String name) { 9 this.name = name;10 }11 12 public void run() {13 // TODO Auto-generated method stub14 for(int i=0;i<... 阅读全文

posted @ 2013-07-10 21:42 MaxNumber 阅读(183) 评论(0) 推荐(0)

< 2025年6月 >
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 1 2 3 4 5
6 7 8 9 10 11 12

导航

统计

Loading...........

点击右上角即可分享
微信分享提示