设为首页 加入收藏

TOP

Java-Web 程序员笔试题
2014-11-24 02:07:11 来源: 作者: 【 】 浏览:59
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

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: