ÉèΪÊ×Ò³ ¼ÓÈëÊÕ²Ø

TOP

Java-Web ³ÌÐòÔ±±ÊÊÔÌâ
2014-11-24 02:07:11 ¡¾´ó ÖРС¡¿ ä¯ÀÀ:568´Î
Tags£ºJava-Web ³ÌÐòÔ± ÊÔÌâ

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);


}


}


¡¾´ó ÖРС¡¿¡¾´òÓ¡¡¿ ¡¾·±Ìå¡¿¡¾Í¶¸å¡¿¡¾Êղء¿ ¡¾ÍƼö¡¿¡¾¾Ù±¨¡¿¡¾ÆÀÂÛ¡¿ ¡¾¹Ø±Õ¡¿ ¡¾·µ»Ø¶¥²¿¡¿
ÉÏһƪ£ºÈí¼þ²âÊÔÃæÊÔ¾­Ñé ÏÂһƪ£ºÓ¢ÎÄËã·¨ÃæÊÔÌâAlgorithms

×îÐÂÎÄÕÂ

ÈÈÃÅÎÄÕÂ

Hot ÎÄÕÂ

Python

C ÓïÑÔ

C++»ù´¡

´óÊý¾Ý»ù´¡

linux±à³Ì»ù´¡

C/C++ÃæÊÔÌâÄ¿