Comment by 'Guest' on 2006-05-25 05:52:08 its nice but wat abt answers? |
Comment by anurag on 2006-05-17 15:38:48 [B]can we make two main in one program[/B] :x |
Comment by Geniee on 2006-06-19 22:44:39 Theses are a few ques in my first interview 1) wht is MVC 2) wht is thread syncronization. explain the use of nitify all 3)Java autimatically handles garbage collection, but how will we call the garbage collector at runtime. 4) what is the diff between ServletContext and SessionContext |
Comment by 'Guest' on 2006-08-28 03:33:42 Q:- What is the difference between Web Server and Application Server=> It supports Load Balance,cache control and it supports HTTP, TCP/Ip and all protocols. But Web server can supports only HTTP.
|
Comment by mukesh on 2006-07-25 20:43:04 what is diff. between jvm and jre |
Comment by 'Guest' on 2006-06-27 13:48:34 do get()- send limited data do post()-send unlimited data interface - contains only abstract methods and finnal constants protect keyword for datamemebers - they are available only for the classes and subclasses in the same package request scope - data in request bean avaliable for all the pages of current client request application scope- data in apllication bean available to all session and all pages in the application. page - data is available only to current page transient keyword for variables- is used when we think a varible sholdn't be serialized |
Comment by 'Guest' on 2006-07-16 21:39:22 good qs..imp ones :-) |
Comment by 'Guest' on 2006-07-21 10:36:48 What is the difference between POST and GET? Get - form data is to be encoded (by a browser) into a URL. Usage recommendations - If the processing of a form is idempotent (i.e. it has no lasting observable effect on the state of the world), then the form method should be GET. Many database searches have no visible side-effects and make ideal applications of query forms. Post - form data is to appear within a message body. Usage - If the service associated with the processing of a form has side effects (for example, modification of a database or subscription to a service), the method should be POST. What problems might you encounter if you have a class level variable in a servlet? All requests use the same instance of a servlet and values can get over-written. Unless the servlet implements single Thread model What is an interface? Within the Java programming language, an interface is a type, just as a class is a type. Like a class, an interface defines methods. Unlike a class, an interface never implements methods; instead, classes that implement the interface implement the methods defined by the interface. A class can implement multiple interfaces. What does the "protected" keyword do? It allows access to class, package and subclass. When writing code to access the database, where is the best place to write your query? In the JSP, the servlet or somewhere else? Best to write it in xml/config files. So that if the DB changes, the code does not have to be recomplied Why do we have wait()/notify()/notifyAll() methods in Objects class? Wait causes current thread to wait until either another thread invokes the notify() method or the notifyAll() method for this object, or a specified amount of time has elapsed. So the thread which owns the monitor will wait for object to be available. The thread goes in wait state for this object and then to relinquish any and all synchronization claims on this object. Thread T becomes disabled for thread scheduling purposes and lies dormant until one of four things happens: • Some other thread invokes the notify method for this object and thread T happens to be arbitrarily chosen as the thread to be awakened. • Some other thread invokes the notifyAll method for this object. • Some other thread interrupts thread T. • The specified amount of real time has elapsed, more or less. If timeout is zero, however, then real time is not taken into consideration and the thread simply waits until notified. What is a weak reference? Suppose that the garbage collector determines at a certain point in time that an object is weakly reachable. At that time it will atomically clear all weak references to that object and all weak references to any other weakly-reachable objects from which that object is reachable through a chain of strong and soft references. At the same time it will declare all of the formerly weakly-reachable objects to be finalizable. At the same time or at some later time it will enqueue those newly-cleared weak references that are registered with reference queues. If Static method is synchronized which object is considered for lock? Class gets the lock not the object. Explain monitors in java? Java provides a monitor when a class has synchronized methods. Whenever control enters a synchronized method, the thread that called the method acquires the monitor for the object whose method has been called. Other threads cannot call a synchronized method on the same object until the monitor is released.
|
Comment by Aniket kumar email: aniketnitj on 2006-07-03 01:29:20 Q: What is the difference between an Interface and an Abstract class? A: An abstract class can have instance methods that implement a default behavior. An Interface can only declare constants and instance methods, but cannot implement default behavior and all methods are implicitly abstract. An interface has all public members and no implementation. An abstract class is a class which may have the usual flavors of class members (private, protected, etc.), but has some abstract methods.
|
Comment by 'Guest' on 2006-07-20 09:49:40 can u tell me a software testing interview questions in cognizant |