多线程实现单词个数统计并展示在页面

读写文件类:

在这里插入图片描述

示例文件内容为:

There is no doubt that Road and Belt is the hottest issue recently.
The media report the news all the time and we feel the power when we see our government holding the meetings.
A lot of countries have joined the team and made this policy effective.
Road and Belt brings great chances to China and other countries.
Chinese government plays the important role, which shows its increasing power in the current situation.
Since the 1990s, Chinese economy increased and opened the new chapter every ten years.
The world sense the great market potential and many foreign companies come to China to seek for cooperation.
Road and Belt opens the door for both sides, which is a win-win situation. In the future, China will become the first economy, which has been predicted by the experts. We are lucky to witness the change.

MyThread线程类

在这里插入图片描述

单词分组类(使用线程池)

在这里插入图片描述

NormalService类

在这里插入图片描述

initCtrl类

在这里插入图片描述

首先需要导入的依赖

在这里插入图片描述

web.xml配置

在这里插入图片描述

index.jsp内容

在这里插入图片描述

运行结果一览

在这里插入图片描述

本次练习让我能够了解多线程完成工作的方法,有趣又快乐,keep moving!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值