Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ans pls

 
muthu moorthy
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Given:
20. public void init(ServletConfig config) throws ServletException {
21. String s1 = config.getInitParameter("servletName");
22. String s2 = config.getServletName();
23. ServletContext context = config.getServletContext();
24. String s3 = context.getInitParameter("serverName");
25. String s4 = context.getInitParameter("servletName");
26. boolean b1 = s1.equals(s2);
27. Boolean b2 = s1.equals(s4);
28. }
...


Which two are true? (Choose two.)

A Compilation will fail due to an error at line 22.
B The value of super.init(config) should be inserted somewhere in this method.
C The value of b1 after line 26 is guaranteed to be true.
D The value of b2 after line 27 is guaranteed to be true.
E Lines 24 and 25 show how to access configuration information useful to an entire web
application
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why dont you compile and run it and you will know the answer in a jiffy
 
muthu moorthy
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, John, i am doing that now
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic