Java J2EE (14736)
J2ME (151)
Java Related AllOther (507) What will happen inside init() in servlet. my interviewer asked servlet lifecycle. i said "once servlet is loaded in to memory init() will be called which performs servlet initialization " . Again interview asked what values will be initialized . what is difference between init() and init(ServletConfig config).
2 13432my method "abc" return array of interface "xyz" and "pqr" is abstract class implements abc and class "jkl" extends pqr My problem 1) when i call abc it retrun array xyz how can i do this hint xyz refer_xyz = new jkl(); but i can't create array. 2)I want to access method of jkl using reference of xyz??
1 4032why business logic written using servlets not in jsp. Jsp used for presentation purpose. serlvet used for coding business logic and controller logic. Reason for using servlets in business logic.
5 13264StringBuilder s = new StringBuilder("Hello Mom");s.append(",I mean,Mother"); Response.Write(s.ToString()); String s = "Hello Mom"; s+ = ",I mean Mom"; Response.Write(s); Which is faster ? which uses the most memory?
HCL,
6 9273
How is declarative handling of exceptions done in struts ?
Can we extract main method from another class?
What is a classloader in java?
Write a program to find the whether a number is an Armstrong number or not?
How can you inject java collection in spring?
What is the difference between equals() and == in java?
What is lazy class?
explain different ways of using thread? : Java thread
What are the contents on web.xml in struts application ?
What are the differences between heap and stack memory in java?
What if I write static public void instead of public static void?
what is reflection api? How are they implemented?
Realized?
What is action chaining ?
What is java string pool?