import java.io.File; import java.util.LinkedList; public class FileSystem { public static int num; public static void main(String[] args) { long a = System.currentTimeMillis(); //String path="c:"; num=0;…
通过继承Thread类实现 多线程- public class Hello{ public static void main(String args[]){ MyThread tr1 = new MyThread("线程1"); MyThread tr2 = new MyThread("线程2"); MyThread tr3 = new MyThread("线程3"); tr1.start(); tr2.start(); tr3.start();…
转载自:python 中字符串大小写转换 一.pyhton字符串的大小写转换, 常用的有以下几种方法: 1.对字符串中所有字符(仅对字母有效)的大小写转换,有两个方法: print 'just to test it'.upper() #所有字母都转换成大写 JUST TO TEST IT print 'JUST TO TEST IT'.lower() #所有字母都转换成小写 just to test it 2.对字符串中的字符(仅对字母有效)部分大小写转换: print 'JUST TO TES…
之前学习了很多涉及servlet的内容,本小结我们说一下监听器,说起监听器,编过桌面程序和手机App的都不陌生,常见的套路都是拖一个控件,然后给它绑定一个监听器,即可以对该对象的事件进行监听以便发生响应,从本质上来说这些都是观察者模式的具体实现,在web程序中的监听器也不例外.在Java Web程序中使用监听器可以通过以下两种方法:通过注解@WebListener来标识一个自定义的监听器:[java] view plain copy@WebListener public class Custom…