![]() |
| Home | Tech FAQ | Interview Questions | Placement Papers | Tech Articles | Learn | Freelance Projects | Online Testing | Geeks Talk | Job Postings | Knowledge Base | Site Search | Add/Ask Question |
![]() Related Questions In the init(ServletConfig) method of Servlet life cycle, what method can be used to access the ServletConfig object ? (a) getServletInfo()(b) getInitParameters()(c) getServletConfig() EjbCreate() method of CMP bean returns (a) null (b) Primary Key class (c) Home Object (d) Remote Object (a) Explanation: ejbCreate() method of BMP bean returns the Primary Key, where as ejbCreate() method of CMP bean returns null. What happens if Database Updation code is written in ejbPassivate() method and if this method is called ? (a) Exception is thrown (b) Successfully executes the Database Updation code (c) Compilation error occurs indicating that Database Updation code should not be written in ejbPassivate() (d) ejbStore() method is called Latest Answer : Life Cycle of Session Bean is: public void Create() public void ejbActivate () public void ejbPassivate () public void remove () public void setSessionContext ( SessionContext ... A servlet implements Single Thread model public class BasicServlet extends HttpServlet implements SingleThreadModel { int number = 0; public void service(HttpServletRequest req, HttpServletResponse res) { } } Which is thread safe ? (a) Only the variable num (b) Only the HttpServletRequest object req (c) Both Which is thread safe ? (a) Only the variable num (b) Only the HttpServletRequest object req (c) Both the variable num & the HttpServletRequest object req A method is defined in a class as : void processUser(int i) { } If this method is overriden in a sub A method is defined in a class as : void processUser(int i) { } If this method is overriden in a sub class, (a) the new method should return int (b) the new method can return any type of values (c) the argument list of new method should exactly match that of overriden method (d) the return type of new method should exactly match that of overriden method 1. what are the different types of design patterns in core java ?2. what do we mean by value object design pattern ? Read Answers (2) | Asked by : ranjan 1.What will be the output?boolean a = false if (a=true){ System.out.ptinln("Hello");}else{ System.out.ptinln("GoodBye");}2. Hashmap , hashset , ArrayList(true, true, false)3.Which need Latest Answer : answer is true ... Read Answers (2) | Asked by : Vartika
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||