Thead01

package cn.itcast.heima2;


public class ThaditionalThread {

public static void main(String[] args) {

Thread thread = new Thread(){
@Override
public void run() {
while(true){
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("111"+Thread.currentThread().getName());

}

}
};

thread.start();

Thread thread2 = new Thread(new Runnable() {

@Override
public void run() {
// TODO Auto-generated method stub
while(true){
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("222"+Thread.currentThread().getName());
}
}
});
thread2.start();

new Thread(
new Runnable() {

@Override
public void run() {
while(true){
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("444"+Thread.currentThread().getName());
}

}
}
){
@Override
public void run() {
while(true){
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
System.out.println("333"+Thread.currentThread().getName());
}
}
}.start();
}

}


多线程机制会提高的运行效率  不会,

为什么会有多线程的下载呢  

是因为抢咯服务器的带宽



<table class="table table-bordered table-striped table-hover"> <thead> <tr><th rowspan="1" style="width:50px">序号</th><th rowspan="1">城市</th><th rowspan="1">日期</th><th rowspan="1">判断依据</th><th rowspan="1">操作</th></tr> </thead> <tbody> <tr><td>1</td><td>长春市</td><td>2025年01月15日</td><td>2025年01月15日04时PM2.5小时浓度为56,PM2.5前6小时平均浓度为17,城市PM2.5小时浓度超过前6小时平均浓度的2.0倍(56>17*2.0),判定为受影响起始时间。 2025年01月21日15时PM2.5小时浓度为17,城市PM2.5小时浓度首次下降至上升前6小时平均浓度的1.1倍(17<=17*1.1),判定为受影响结束时间。</td> <td> <a class="" href="javascript:void(0);" onclick="btnSave()" target="_self" trbutton="btnSave">保存</a> </td> </tr> <tr><td>7</td><td>长春市</td><td>2025年01月21日</td><td>2025年01月15日04时PM2.5小时浓度为56,PM2.5前6小时平均浓度为17,城市PM2.5小时浓度超过前6小时平均浓度的2.0倍(56>17*2.0),判定为受影响起始时间。 2025年01月21日15时PM2.5小时浓度为17,城市PM2.5小时浓度首次下降至上升前6小时平均浓度的1.1倍(17<=17*1.1),判定为受影响结束时间。</td> <td> <a class="" href="javascript:void(0);" onclick="btnSave()" target="_self" trbutton="btnSave">保存</a> </td> </tr> <tr><td>8</td><td>长春市</td><td>2025年01月29日</td><td>2025年01月29日02时PM2.5小时浓度为47,PM2.5前6小时平均浓度为23,城市PM2.5小时浓度超过前6小时平均浓度的2.0倍(47>23*2.0),判定为受影响起始时间。 2025年01月29日04时PM2.5小时浓度为17,城市PM2.5小时浓度首次下降至上升前6小时平均浓度的1.1倍(17<=23*1.1),判定为受影响结束时间。</td> <td> <a class="" href="javascript:void(0);" onclick="btnSave()" target="_self" trbutton="btnSave">保存</a> </td> </tr> </tbody></table> 写出方法btnSave 点击时获取所在行的 城市 日期 判断依据
最新发布
07-01
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值