没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
package com.wallta.thread;
public class WaitTest {
static int count = 1;
public WaitTest() {
// TODO Auto-generated constructor stub
}
public static void main(String[] args) throws InterruptedException {
WaitTest a = new WaitTest();
WaitTest_b b = new WaitTest().new WaitTest_b();
b.start();
synchronized (b)
{
System.out.println("into main method is Start!");
count = 10;
a.callback(b); // 使用多线程 实现回调 函数
System.out.println("call back method this total is =" + b.total);
}
}
public class WaitTest {
static int count = 1;
public WaitTest() {
// TODO Auto-generated constructor stub
}
public static void main(String[] args) throws InterruptedException {
WaitTest a = new WaitTest();
WaitTest_b b = new WaitTest().new WaitTest_b();
b.start();
synchronized (b)
{
System.out.println("into main method is Start!");
count = 10;
a.callback(b); // 使用多线程 实现回调 函数
System.out.println("call back method this total is =" + b.total);
}
}
资源评论
csdn_980979768
- 粉丝: 19
- 资源: 19
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功