1.首先展示一下实例代码(Son.java & Father.java) public class Father { public static int a=10;//父类的静态变量 static{//父类的静态代码块 a=20; } {//父类的构造代码块 a=30; } public Father() {//父类的构造方法 a=40; } } public class Son extends Father{ public static int s=10;//子类的静态变量 public in
项目:3个filter,3个servlet,匹配的url路径/hello. 情况1:servlet没加<load-on-startup></load-on-startup>情况(web.xml配置顺序:first filter,second filter,third filter,first servlet,second servlet,third servlet): 初始化tomcat时: this is the first filter init()..... this is
一.shell脚本介绍 (一)脚本案例及介绍: #!/bin/bash LOG_DIR=/var/log ROOT_UID=0 if ["$UID -ne "$ROOT_UID"] then echo "must be root run this script." exit 1 fi cd $ LOG_DIR || { echo "cannot change to necessary directory" exit 1 } cat /d