![]() |
| 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 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. (b) Latest Answer : Runnable Interface ... What is the output of following block of program ? boolean var = false; if(var = true) { System.out.println("TRUE"); } else { System.out.println("FALSE"); }(a) TRUE (b) FALSE (c) Compilation Error (d) Run-time Error (a) EXPLANATION: The code compiles and runs fine and the 'if' test succeeds because 'var' is set to 'true' (rather than tested for 'true') in the 'if' A Vector is declared as follows. What happens if the code tried to add 6 th element to this Vector new vector(5,10) (a) The element will be successfully added (b) ArrayIndexOutOfBounds Exception (c) The Vector allocates space to accommodate up to 15 elements (a) and (c) EXPLANATION: The 1 st argument in the constructor is the initial size of Vector and the 2 nd argument in the constructor is the growth in size (for each allocation) This Vector is created (d) Latest Answer : The answer is all of the above, Stateful session beans contain Home interface, Remote interface, Bean class ... A servlet implements Single Thread model public class BasicServlet extends HttpServlet implements SingleThreadModel { int number = 0; public void service(HttpServletRequest req, HttpServletResponse res) { } } 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 Latest Answer : Singleton class has only one instance, and to provide a global point of access to it.ex class Singleton { public: static Singleton* Instance(); protected: Singleton(); ... Read Answers (1) | Asked by : rekha Latest Answer : File f = new File(""); f.length(); ... Read Answers (1) | Asked by : raga
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||