public class Servlet1 extends HttpServlet {
public String s1=¡±abc¡±;
public void doGet(HttpServletRequest request,HttpServletResponse response){
String s2=¡±def¡±;
HttpSession session=request.getSession();
}
}
class Value {
public int i = 15;
}
public class Test {
public static void main(String[] args) {
Test t = new Test();
t.first();
}
public void first() {
int i = 5;
Value v = new Value();
v.i = 25;
second(v, i);
System.out.println(v.i);
}
public void second(Value v, int i) {
i = 0;
v.i = 20;
Value val = new Value();
v = val;
System.out.println(v.i + ¡± ¡± + i);
}
}
boolean a = true;
boolean b = false;
boolean c = true;
if (a == true)
if (b == true)
if (c == true)
System.out.println(¡°Some things are true in this world¡±);
else
System.out.println(¡°Nothing is true in this world!¡±);
else if (a && (b = c))
System.out
.println(¡°It¡¯s too confusing to tell what is true and what is false¡±);
else
System.out.println(¡°Hey this won¡¯t compile¡±);
a.µ÷ÓÃJspInit()·½·¨ b.µ÷ÓÃ_jspService()·½·¨ c.µ÷ÓÃjspDestory()·½·¨ d.ÍøÒ³½âÊÍ e.JSP±àÒë f.ÔØÈëÀà g.½¨Á¢ServletʵÌå
public class XxxDao {
private int size;
public void setSize(int size) {
this.size = size;
}
public void method1(){
int t = size*100;
}
public void method2(int sizeA){
this.size = sizeA;
AnothorDao.anothorMethod(size);
}
}