This action might not be possible to undo. Are you sure you want to continue?
Interview Questions & Answers
Banking Interview Questions [Bank PO ,Clerk]
1.Tell me something about yourself? 2.Why you want to make a career in banking after doing MBA/Engg? 3.What are your career goals (long term & short term)? 4.What is Financial Inclusion? 5.What is Repo rate/Reverse Repo Rate? What is the Difference between the two? SBI clerk Questions (all collected from other threads or from orkut) 1-why r u interested in banking sector..?? 2-Do u support privatisation of banks? why..?? 3-Being in a public sector bank how can u compete with private sector banks...?? 4-what steps 2b taken 2 control global warming.? Questions posted by Akanshita 1.wat is NPA? 2.why do u want to join sbi. 3.Tell something abt yourself? 4.how many time u have cleared sbi exam? 5.who is the current chairman of sbi? 6.what is CRR? 7.what is RR(Repo rate)? 7.why did u choosed sbi for the job while pvt sector bank is paying heavy salary to his employee? 8.which banned outfit is responsible for recent blast in different city of india? 9.who is the governor of RBI? 10.u have completed your graduation(if u have)in this year(----).what u were doing till now? 11.who is the finance secretary? # What is RR(Reporate) # Whats is CRR # Whats is reverse RR # Whats is SLR # Whats r d tools with RBI to control liquidity in market
.why do u want to join sbi.which banned outfit is responsible for recent blast in different city of india? 9..?? 2-Do u support privatisation of banks? why.wat is NPA? 2.why did u choosed sbi for the job while pvt sector bank is paying heavy salary to his employee? 8...what is CRR? 7.what is RR(Repo rate)? 7. 3.# Who is d chairperson of RBI # Which bank recently got submerged in SBI # Who is the owner of SBI at present n with what % of shares # What was d name of first bank established in India ? # # # # When was State Bank of India established in India Who is the Chairman of SBI Financial crisis in America Why joining SBI or Banking Sector # Questions on Hobby # Historical or geographical Importance of d place u live SBI clerk Qus (all collected from other threads or from orkut) 1-why r u interested in banking sector.?? 3-Being in a public sector bank how can u compete with private sector banks.u have completed your graduation(if u have)in this year(----).Tell something abt yourself? 4.who is the governor of RBI? 10.how many time u have cleared sbi exam? 5.what u were doing till now? 11.? 1.who is the current chairman of sbi? 6.who is the finance secretary? # What is RR(Reporate) # Whats is CRR # Whats is reverse RR # Whats is SLR # Whats r d tools with RBI to control liquidity in market # Who is d chairperson of RBI # Which bank recently got submerged in SBI # Who is the owner of SBI at present n with what % of shares .?? 4-what steps 2b taken 2 control global warming.
then they asked me wat i like n dislike in INDIA.# What was d name of first bank established in India ? # When was State Bank of India established in India # Who is the Chairman of SBI # Financial crisis in America # Why joining SBI or Banking Sector # Questions on Hobby # Historical or geographical Importance of d place u live SBI clerk Qus (all collected from other threads or from orkut) questions asked to me: since i am a comp. then they also asked me abtwat's imp. c and vb then hw computers r used in banks? earlier days v used maintain separate record for each n every person who hv account but after being computersied as v type the acc.. they questioned me "wat's imp.. i replied temples. Wat r the nationalised banks? since i am doing college ug final year they asked y do come for job when u r studying..bet throw ball and volley ball as i hv won state level certificate in elocution i was asked to speak abt. regarding kanchipuram". next i am a throwball player.....c++ and now i learning vb.... INDIA for 2 min. student they asked what r d languages i hv learnt i replied c.. sci.dist. then dd forms were computerised..no. since i'm 4m vandalur next to chennai .earlier it was written by hand .Head Quarter then kanchipuram silk.. i replied ICICI and HDFC full form of ICICI ? Industrial Credit and Investment Corporation of India. so they asked what's d diff... then core banking. they asked the diff.I replied that the main aim of studies is to know wat's going around us and the next ... in vandalur next wat do u know abt SBI wat r the private banks ans.. it display all the details.. bet.. it comes under kanchipuram dist.
next i am a throwball player.Head Quarter then kanchipuram silk. it display all the details...c++ and now i learning vb. regarding kanchipuram".....no.. when the oppurtunity knocks at me y shdn't i use it. they asked the diff.bet throw ball and volley ball as i hv won state level certificate in elocution i was asked to speak abt.. then they asked me wat i like n dislike in INDIA. INDIA for 2 min... then they also asked me abtwat's imp.dist.. then wat is u. then wat is u.s crisisSBI clerk Qus (all collected from other threads or from orkut) questions asked to me: since i am a comp. it comes under kanchipuram dist. when the oppurtunity knocks at me y shdn't i use it.s crisis -----------------------------------------------------------------------------------------------------------SBI clerk Qus (all collected from other threads or from orkut) . so they asked what's d diff. then dd forms were computerised...is to get the job ..... Wat r the nationalised banks? since i am doing college ug final year they asked y do come for job when u r studying.. i replied ICICI and HDFC full form of ICICI ? Industrial Credit and Investment Corporation of India. since i'm 4m vandalur next to chennai . they questioned me "wat's imp. sci.... student they asked what r d languages i hv learnt i replied c. i replied temples... c and vb then hw computers r used in banks? earlier days v used maintain separate record for each n every person who hv account but after being computersied as v type the acc.earlier it was written by hand . in vandalur next wat do u know abt SBI wat r the private banks ans... then core banking..I replied that the main aim of studies is to know wat's going around us and the next is to get the job . bet.
....and within 15 mins my interview was over !!!!!!!!! Keep Smiling throughout.it is same for all materials or not and regarding about "gate way of india" where it is and y it has made? where is the india gate and y it has build? that sal... -----------------------------------------------------------------------------------------------------------hi guy's today i given interview at hyd sbi learning centre........? how much % Govt owns in Niacl. Public liability? ..? What is CRR? Define SLR? how can we control the liquidity in system with CRR..... they just asked about my details and some computer questions i..they'll correct u if u r wrong.if u dont know tell it frankly..we had 3 men n a lady to interview us..no probs... my interview was so cool.e..one person asked me abt my hobbies [painting.a famous tourist attraction . what is dos? what is ram? and what is floating and what is gravitational force.....? When is niacl nationalized.and abt debt waivers of farm loans. Simple.? How much %govt should own to make the company govt owned? Tell me about recent un summit(copenhagen)? What is the profit of NIACL? Income of NIACL? what is a liability ? what is insurance liability? (person got confused and confused me).. 3rd person asked me abt my native plc n abt deposits n loans provided by the bank.they asked me to tell abt that too... 4th person asked me abt the speciality of a famous personality Sir M.... 2nd person asked me chairman of SBI n finance min of my state.colours n how do i select my theme to paint] and abt my plc and since i've written Tally as my spcl course .... Vishveshvaraiyya as he's the pioneer of the KRS Dam built in Mysore. all the best for other guy's NIA interview questions What is CAR? Reinsurance? when is niacl established.
How much makrs i will give myself out of 10 for this interview ? JAVA Interview Questions 1.Why will you stay with niacl? suppose you got selected in Federal bank united bank of india and NIACL which one you choose and please be honest. In other words. What is a virtual function in C++? Simply put. What do you know about NIACL ? 16. Public: accessible to all classes Private: accessible only to the class to which they belong Protected: accessible to the class to which they belong and any subclasses. What is the CFA course of ICFAI ? 4.: 1.? Interview: I was asked the following questions by the 4 member panel. I am an MBA(Finance) from IBS. It is a good feature since the specific function to call is determined at run-time. 5. a virtual function allows derived classes to replace the implementation provided by the base class. protected. Where does an insurance company invests its funds ? 7. What is Yield ? 9. Tell me something about ICFAI ? 3. What does ICFAI stands for ? 2. My family background. What are treasury bills ? 8. 3. What are dated securities ? 13. How is it important for insuarnce sector ? 12. How is yield related to market price ? 10. what are the disbursements for NIACL? 18.Mumbai. How will you handle the situation if an experienced and old employee misbehaves with you in office ? 19.I was the first to give interview that day. What is a cartesian product in PL/SQL? When a Join condition is not specified by the programmer or is invalid(fails). What is mark to market ? 11. and public? These keywords are for allowing privilages to components such as functions and variables. the virtual keyword enables a function to be ‘virtual’ which then gives possibility for that function to be overridden (redefined) in one or more descendant classes. PL/SQL forms a . Paid up capital of NIACL ? 15. What are sources of income for NIACL? 17. 2. What considerations should be taken while making a portfolio ? 6. What is HTM & AFS ? 11. What is the difference between private. Founder of NIACL ? 14.
What are some advantages and disadvantages of Java Sockets? Some advantages of Java Sockets: Sockets are flexible and sufficient. . to a method.Cartesian product. Efficient socket based programming can be easily implemented for general communications. all combinations of rows will be displayed. you can simply use the synchronized keyword and explicitly or implicitly provide an Object. For mutual exclusion. Java provides many utilities to deal with mutual exclusion with the use of threaded programming. The runtime system/Java compiler takes care of the gruesome details for you. Since the data formats and protocols remain application specific. Unlike HTML forms and CGI scripts that generate and transfer whole web pages for each new request. the notifyAll( ) method wakes up all threads that are in the wait list of an object. There are several methods in Java used for communicating mutually exclusive threads such as wait( ). or notifyAll( ). For example. An Interface can only declare constants and instance methods. Java applets can send only necessary updated information. Socket based communications allows only to send packets of raw data between applications. 5. 4. For example. but cannot implement default behavior. What is the difference between an Interface and an Abstract class? An Abstract class declares have at least one instance method that is declared abstract which will be implemented by the subclasses. What is mutual exclusion? How can you take care of mutual exclusion using Java threads? Mutual exclusion is where no two processes can access critical regions of memory at the same time. Both the client-side and server-side have to provide mechanisms to make the data useful in any way. to synchronize on. It joins a bunch of rows and it’s result is rarely useful unless you have a need to combine all rows from all tables. and to nowhere else on the network Despite all of the useful and helpful Java features. or to a block of code. Some disadvantages of Java Sockets: Security restrictions are sometimes overbearing because a Java applet running in a Web browser is only able to establish connections to the machine where it came from. All rows in the first table are joined to all rows in the second table. notify( ). the re-use of socket based implementations is limited. An abstract class can have instance methods that implement a default behavior. Sockets cause low network traffic. any Object. In a Cartesian product. The synchronized keyword can be applied to a class. 1.
it is possible for one thread to modify a shared variable while another thread is in the process of using or updating same shared variable.util. operating on each object in . HashMap is non synchronized and Hashtable is synchronized.the only interface can help. Explain different way of using thread? The thread could be implemented by using runnable interface or by inheriting from the Thread class.. synchronization is the capability to control the access of multiple threads to shared resources. This interface allows you to walk a collection of objects. 3. and is invoked using the dot operator. Difference between Swing and Awt? AWT are heavy-weight componenets. and is invoked using the new operator. What is HashMap and Map? Map is Interface and Hashmap is class that implements that. Passby Value means passing a copy of the value to be passed. A method is an ordinary member function of a class. A Java object is subject to garbage collection when it becomes unreachable to the program in which it is used. (HashMap allows null values as key and value whereas Hashtable doesnt allow).? With respect to multithreading. a return type (which may be void). 5. Difference between Vector and ArrayList? Vector is synchronized whereas arraylist is not. except that it is unsynchronized and permits nulls. HashMap does not guarantee that the order of the map will remain constant over time. What are pass by reference and passby value? Pass By Reference means the passing the address itself rather than passing the value. What is the difference between a constructor and a method? A constructor is a member function of a class that is used to create objects of that class. and when is it used? The purpose of garbage collection is to identify and discard objects that are no longer needed by a program so that their resources can be reclaimed and reused. 11. This usually leads to significant errors. It has the same name as the class itself. The former is more advantageous. 7. 9. Difference between HashMap and HashTable? The HashMap class is roughly equivalent to Hashtable. 4. has no return type. Without synchonization. 8. Hence swing works faster than AWT.2. 10. 6.Iterator interface. Describe synchronization in respect to multithreading. What is an Iterators? Some of the collection classes provide traversal of their contents via a java. Swings are light-weight components. It has its own name. ’cause when you are going for multiple inheritance. What is the purpose of garbage collection in Java.
Static methods are implicitly final.ABCD.g. as long as the original method was not declared final. A class may be declared abstract even if it has no abstract methods. default modifiers both singly and in combination and state the effect of package relationships on declared items qualified by these modifiers. final class may not be subclassed. This means that you can use them without creating an instance of a class. and must be declared as such. protected.. you can’t change a static method into an instance method in a subclass. You can’t change value of a final variable (is a constant). 3. A class that is abstract may not be instantiated (ie. will the code containing an import such as java. because overriding is done based on the type of the object. A final method can’t be overridden when its class is inherited. Are the imports checked for validity at compile time? e. 1.MyTest.This access is provided even to subclasses that reside in a different package from the class that owns the protected feature. In other words. Any class with an abstract method is automatically abstract itself. public private or protected). 13.ABCD compile? Yes the imports are checked for the semantic validity at compile time.lang. you can’t override a static method with a nonstatic method.MyTest.turn. It serves as a template. and static methods are attached to a class. abstract class may contain static data. Remember when using Iterators that they contain a snapshot of the collection at the time the Iterator was obtained. 2. Does importing a package imports the subpackages as well? e. not an object. What is final? A final class can’t be extended ie. 12. A static method in a superclass can be shadowed by another static method in a subclass. you may not call its constructor). not one for each object no matter how many instance of a class might exist. Does importing com. State the significance of public.can not resolve symbol symbol : class ABCD location: package io import java. protected : Is available to all classes in the same package and also available to all subclasses of the class that owns the protected feature. generally it is not advisable to modify the collection itself while traversing an Iterator. A private feature may only be accessed by the class that owns the feature. However. This prevents it from being instantiated. What is an abstract class? Abstract class must be extended/subclassed (to be useful).io.UnitTests. The code containing above line of import will not compile.It means that it is visible to all within a particular package.? public : Public class is visible in other packages. What is static in java? Static means one per class.g. private.* also import com. default :What you get by default ie. 14.*? . field is visible everywhere (class must be public too) private : Private variables or methods may be used only by an instance of the same class that declares the variable or method. without any access modifier (ie. It will throw an error saying.
5. 4. It will not import any class in any of it’s subpackage. how can one have a control over the serialization process? Yes it is possible to have control over serialization process. The class should implement Externalizable interface. But defining means declaration + initialization. 6. This means that a level class can not be private. What type of parameter passing does Java support? In Java the arguments are always passed by value . What is the default value of an object reference declared as an instance variable? null unless we define it explicitly.* will import classes in the package MyTest only. How can I customize the seralization process? i. This will save the object to a file. it does not contain any methods. 10.MyTest. Can a level class be private or protected? No. 13. are both definitions. .g String s. Primitive data types are passed by reference or pass by value? Primitive data types are passed by value. Which methods of Serializable interface should I implement? The serializable interface is an empty interface. the object reference itself is passed by value and so both the original reference and parameter copy both refer to the same object . We do not initialize it.If a level class is declared as private the compiler will complain that the “modifier private is not allowed here”. 11.e.No you will have to import the subpackages explicitly. 9. Importing com. Or String s = “abcd”. How do I serialize an object to a file? The class whose instances are to be serialized should implement an interface Serializable. Then you pass the instance to the ObjectOutputStream which is connected to a fileoutputstream. is just a declaration while String s = new String (“abcd”). It can have either “public” or no modifier. 7. e. This interface contains two methods namely readExternal and writeExternal. With objects. Same is the case with protected. 12. What is the difference between declaring a variable and defining a variable? In declaration we just mention the type of the variable and it’s name. So we do not implement any methods. You should implement these methods and write the logic for customizing the serialization process. What is serialization? Serialization is a mechanism by which you can save the state of an object by converting it to a byte stream. If it does not have a modifier it is supposed to have a default access. 8. A level class can not be private or protected. Objects are passed by value or by reference? Java only supports pass by value.
8. What if I write static public void instead of public static void? Program compiles and runs properly. abstract class may contain static data. 1. objects need to be serialized. A class may be declared abstract even if it has no abstract methods. What is an abstract class? Abstract class must be extended/subclassed (to be useful). What if the main method is declared as private? The program compiles properly but at runtime it will give “Main method not public. 7. If any of the objects is not serializable then it throws a NotSerializableException. 3. Thus it determines whether the included object references are serializable or not. This is unlike C/C++ where the first element by default is the program name. all the included objects are also serialized alongwith the original obect. A class that is abstract may not be instantiated (ie. 9. 6. This is a recursive process. What is the common usage of serialization? Whenever an object is to be sent over the network. These methods give you a control over the serialization mechanism. But at runtime throws an error “NoSuchMethodError”.14. It serves as a template. What happens to the object references included in the object? The serialization mechanism generates an object graph for serialization. objects need to be serilazed. Thus when an object is serialized. 4. you may not call its constructor).” message. Thus if your class implements this interface. What if the static modifier is removed from the signature of the main method? Program compiles. Moreover if the state of an object is to be saved. and must be declared as such. 5. If I do not provide any arguments on the command line. 2. What is the first argument of the String array in main method? The String array is empty. What is Externalizable interface? Externalizable is an interface which contains two methods readExternal and writeExternal. What one should take care of while serializing the object? One should make sure that all the included objects are also serializable. What if I do not provide the String array as the argument to the method? Program compiles but throws a runtime error “NoSuchMethodError”. you can customize the serialization process by implementing these methods. Any class with an abstract method is automatically abstract itself. then the String array of Main method will be empty of null? . This prevents it from being instantiated. It does not have any element. 10.
however. the compiler doesn’t force client programmers either to catch the exception or declare it in a throws clause. That means it is empty. Runtime exceptions do not need to be. StringIndexOutOfBoundsException thrown by String’s charAt() method Checked exceptions must be caught at compile time.lang package any time? Why ? No. The JVM will look for the Main method only in the class whose name you have mentioned. With an unchecked exception.It is empty. 17. Can an application have multiple classes having main method? Yes it is possible.FileInputStream’s read() method checked exceptions are RuntimeException and any of its subclasses. IOException thrown by java. Do I need to import java.io. 15. 18. How can one prove that the array is not null but empty? Print args. The compiler says that the main method is already defined in the class. and arguments as a method in its superclass. 14. What is Overriding? When a class defines a method using the same name. Neither compiler nor JVM complains abt it.length. 13. Errors often cannot be. client programmers may not even know that the exception could be thrown. Can I import same package/class twice? Will the JVM load the package twice at runtime? One can import the same package or same class multiple times. And the JVM will internally load the class only once no matter how many times you import the same class. 11.length. But not null. excluding class RuntimeException and its subclasses. 16. But if it would have been null then it would have thrown a NullPointerException on attempting to print args. While starting the application we mention the class name to be run. eg. Hence there is not conflict amongst the multiple classes having main method. It will print 0. Can I have multiple main methods in the same class? No the program fails to compile. In fact. Making an exception checked forces client programmers to deal with the possibility that the exception will be thrown. When the method is invoked for an object of the class. It is by default loaded internally by the JVM. What are Checked and UnChecked Exception? A checked exception is some subclass of Exception (or Exception itself). Class Error and its subclasses also are unchecked. the method in the class overrides the method in the superclass. eg. return type. it is the new definition of the method that is . 12. What environment variables do I need to set on my machine in order to be able to run Java programs? CLASSPATH and PATH are the two variables.
3. Any class outside the declaring class accesses the nested class with the declaring class name acting similarly to a package.g. In order for the class to be useful beyond the declaration block. eg.lang. If it does not have a modifier it is supposed . -level inner classes implicitly have access only to static variables. What are different types of inner classes? They are Nested -level classes. protected. Does importing com. e. We do not initialize it. The primary difference between member classes and nested -level classes is that member classes have access to the specific instance of the enclosing class. What is the difference between declaring a variable and defining a variable? In declaration we just mention the type of the variable and it’s name.inner. 4. the modifiers public.If you declare a class within a class and specify the static modifier. Methods may be overridden to be more public. It will throw an error saying.g. Importing com. 5. All of these are of the nested -level variety. Local classes. specific to a block of code.UnitTests.can not resolve symbol symbol : class ABCD location: package io import java.ABCD.* also import com. Local classes – Local classes are like local variables.Because local classes are not members. Does importing a package imports the subpackages as well? e. Are the imports checked for validity at compile time? e. and not the method definition from superclass.* will import classes in the package MyTest only. and static are not usable. is just a declaration while String s = new String (“abcd”). the compiler treats the class just like any other -level class. What is the default value of an object reference declared as an instance variable? null unless we define it explicitly.MyTest. The code containing above line of import will not compile. It can have either “public” or no modifier. This means a public member class acts similarly to a nested -level class.g String s.called. private. will the code containing an import such as java. Member classes – Member inner classes are just like other member methods and member variables and access to the member class is restricted. 1. But defining means declaration + initialization. 2. A level class can not be private or protected. you cannot provide a constructor. It will not import any class in any of it’s subpackage.*? No you will have to import the subpackages explicitly.ABCD compile? Yes the imports are checked for the semantic validity at compile time. outer. are both definitions. 19.MyTest. not more private. Their visibility is only within the block of their declaration. it would need to implement a more publicly available interface. Can a level class be private or protected? No. Or String s = “abcd”.io. Anonymous classes Nested -level classes.There can also be inner interfaces. Member classes.MyTest. As anonymous classes have no name. Anonymous classes – Anonymous inner classes extend local inner classes one level further. just like methods and variables.
Objects are passed by value or by reference? Java only supports pass by value. What type of parameter passing does Java support? In Java the arguments are always passed by value . Moreover if the state of an object is to be saved. What happens to the object references included in the object? The serialization mechanism generates an object graph for serialization. objects need to be serialized. it does not contain any methods. 11. With objects. These methods give you a control over the serialization mechanism.to have a default access. If a level class is declared as private the compiler will complain that the “modifier private is not allowed here”. You should implement these methods and write the logic for customizing the serialization process. How can I customize the seralization process? i.e. 9. This interface contains two methods namely readExternal and writeExternal. 6. So we do not implement any methods. What one should take care of while serializing the object? One should make sure that all . This will save the object to a file. you can customize the serialization process by implementing these methods. 8. 7. all the included objects are also serialized alongwith the original obect. objects need to be serilazed. What is the common usage of serialization? Whenever an object is to be sent over the network. Primitive data types are passed by reference or pass by value? Primitive data types are passed by value. Then you pass the instance to the ObjectOutputStream which is connected to a fileoutputstream. the object reference itself is passed by value and so both the original reference and parameter copy both refer to the same object . 12. 13. how can one have a control over the serialization process? Yes it is possible to have control over serialization process. Thus if your class implements this interface. How do I serialize an object to a file? The class whose instances are to be serialized should implement an interface Serializable. 15. What is Externalizable interface? Externalizable is an interface which contains two methods readExternal and writeExternal. Thus when an object is serialized. 14. What is serialization? Serialization is a mechanism by which you can save the state of an object by converting it to a byte stream. Which methods of Serializable interface should I implement? The serializable interface is an empty interface. Same is the case with protected. This is a recursive process. 10. The class should implement Externalizable interface. This means that a level class can not be private. Thus it determines whether the included object references are serializable or not. 16.
It is possible for programs to use up memory resources faster than they are garbage collected. Without synchronization. 23. What happens to the static fields of a class during serialization? Are these fields serialized as a part of each serialized object? Yes the static fields do get serialized. synchronization is the capability to control the access of multiple threads to shared resources. What is the difference between a while statement and a do statement? A while statement . a task executes for a predefined slice of time and then reenters the pool of ready tasks. This often leads to significant errors. How are Observer and Observable used? Objects that subclass the Observable class maintain a list of observers. [Received from Venkateswara Manam] 19. it is possible for one thread to modify a shared object while another thread is in the process of using or updating that object’s value. Under time slicing. 21. based on priority and other factors. 26. What is the Locale class? The Locale class is used to tailor program output to the conventions of a particular geographic.the included objects are also serializable. 24. The Observer interface is implemented by objects that observe Observable objects. What is the purpose of finalization? The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected. The static fields are serialized as a part of every object. The scheduler then determines which task should execute next. When an Observable object is updated it invokes the update() method of each of its observers to notify the observers that it has changed state. 22. 20. 17. If any of the objects is not serializable then it throws a NotSerializableException. When a thread is created and started. what is its initial state? A thread is in the ready state after it has been created and started. How does Java handle integer overflows and underflows? It uses those low order bytes of the result that can fit into the size of the type allowed by the operation. If the static field is an object then it must have implemented Serializable interface. 18. or cultural region. It is also possible for programs to create objects that are not subject to garbage collection . Does garbage collection guarantee that a program will not run out of memory? Garbage collection does not guarantee that a program will not run out of memory. What is synchronization and why is it important? With respect to multithreading. But the commonness of the static fields across all the instances is maintained even after serialization. the highest priority task executes until it enters the waiting or dead states or a higher priority task comes into existence. 25. political. What is the difference between preemptive scheduling and time slicing? Under preemptive scheduling.
What are the common mechanisms used for session tracking? Cookies SSL sessions URL.servlet.servlet. 3. The getRequestDispatcher(String path) method of javax. Explain ServletContext. then initialized wih the init() method.servlet. ServletResponse res) throws ServletException. IOException public void destroy() First the servlet is constructed. Non-static variables take on unique values with each object instance. The directory structure of a web application consists of two parts. 27. A servlet can use . which can be relative to the request of the calling servlet. public void init(ServletConfig config) throws ServletException public void service( ServletRequest req. Any request from client are handled initially by the service() method before delegating to the doXxx() methods in the case of HttpServlet. Explain the directory structure of a web application. All path must sart with a “/” and are interpreted as relative to curent context root. web.servlet. classes directory 3. destroyed with the destroy() methid. 1. 28. ServletContext interface is a window for a servlet to view it’s environment.ServletRequest interface and javax. What is the difference between static and non-static variables? A static variable is associated with the class as a whole rather than with specific instances of a class. The javax. Explain the life cycle methods of a Servlet. lib directory 4.ServletContext interface cannot accepts relative paths. super() is used to invoke a superclass constructor. 2. The do statement will always execute the body of a loop at least once. What is the difference between the getRequestDispatcher(String path) method of javax. then garbaged collected and finalized.Servlet interface defines the three methods known as life-cycle method.checks at the beginning of a loop to see whether the next loop iteration should occur. WEB-INF folder consists of 1.xml 2.ServletRequest interface accepts parameter the path to the resource to be included or forwarded to.servlet.ServletContext interface? The getRequestDispatcher(String path) method of javax. A private directory called WEB-INF A public resource directory which contains public resource folder. If the path begins with a “/” it is interpreted as relative to the current context root. How are this() and super() used with constructors? this() is used to invoke a constructor of the same class. The servlet is removed from service.rewriting 5. A do statement checks at the end of a loop to see whether the next iteration of a loop should occur.
8.allapplabs. A hidden comment is not sent to the client. The hidden comment is useful when you want to hide or “comment out” part of your JSP page. The JSP engine ignores a hidden comment. doOptions(). Both these classes are abstract.1).this interface to get information such as initialization parameters for the web applicationor servlet container’s version. either in the displayed JSP page or the HTML page source. What is the difference between HttpServlet and GenericServlet? A GenericServlet has a service() method aimed to handle requests. You can see the comment by viewing the page source from your Web browser. doPost(). returning the comment in the HTML output sent to the client. 1. What is a _Expression? An _expression tag contains a scripting language _expression that is evaluated. If you need to use –%> in your comment. doTrace() methods (HTTP 1. What is a Hidden Comment? A comments that documents the JSP page but is not sent to the client.The JSP engine handles an output comment as uninterpreted HTML text. You can use any characters in the body of the comment except the closing –%> combination. JSP Syntax Example 1 Displays in the page source: 2. 7. Every web application has one and only one ServletContext and is accessible to all active resource of that application. which can be specified in the deployment descriptor to make the servlet container load and initialize the servlet as soon as it starts up. and it’s impossible to guess the data transmitted to a servlet only looking at a request string. doDelete(). JSP Syntax Examples 3. The servlet specification defines the element. and doPost() method doesn’t have this limitation. What is preinitialization of a servlet? A container doesnot initialize the servlets ass soon as it starts up. it initializes a servlet when it receives a request for that servlet first time. and does not process any code within hidden comment tags. What is the difference between Difference between doGet() and doPost()? A doGet() method is limited with 2k of data to be sent.0) plus doPut(). All parameters are stored in a request itself. converted to a . What is a output comment? A comment that is sent to the client in the viewable page source. HttpServlet extends GenericServlet and adds support for doGet(). 6. doHead() methods (HTTP 1. The process of loading a servlet before any request comes in is called preloading or preinitializing a servlet. you can escape it by typing –%\>.com/svt1? p1=v1&p2=v2&…&pN=vN doPost() method call doesn’t need a long text tail after a servlet name in a request. A request string for doGet() looks like the following: http://www. This is called lazy loading. not in a request string.
8. Like You cannot use a semicolon to end an _expression 4. HTML-encoded text. page 2. Scriptlets are executed at request time. Difference between forward and sendRedirect? When you invoke a forward request. and inserted where the _expression appears in the JSP file. This extra round trip a redirect is slower than forward. The implicit objects re listed below request response pageContext session application out config page exception 7. When a sendRedirtect method is invoked. What is a Scriptlet? A scriptlet can contain any number of language statements. it causes the web container to return to the browser indicating that a new URL should be requested. from which you can display it. 5. the request is sent to another resource on the server. request 3. variable or method declarations. Because the browser issues a completly new request any object that are stored as request attributes before the redirect occurs will be lost. You must write plain text. when the JSP engine processes the client request. as long as they are separated by semicolons. the output is stored in the out object. Because the value of an _expression is converted to a String. or expressions that are valid in the page scripting language.String. you can 1. 6.session . 3. without the client being informed that a different resource is going to process the request. What are implicit objects? List them? Certain objects that are available for the use in JSP documents without being declared first. The declaration must be valid in the scripting language used in the JSP file. These objects are parsed by the JSP engine and inserted into the generated servlet. If the scriptlet produces output. What is a Declaration? A declaration declares one or more variables or methods for use later in the JSP source file. or other JSP tags outside the scriptlet.Declare variables or methods to use later in the file (see also Declaration). 2.Use any of the JSP implicit objects or any object declared with a tag. You can declare any number of variables or methods within one declaration tag. This process occurs completly with in the web container. What are the different scope valiues for the ? The different scope values for are 1. you can use an _expression within text in a JSP file.Within scriptlet tags. A declaration must contain at least one complete declarative statement.Write expressions valid in the page scripting language (see also _Expression).
The jspInit().jsp package. the generated servlet class thus implements all the methods of the these three interfaces. passing it the request and the response objects.application 9. Hte HttpJspPage interface extends the JspPage interface which inturn extends the Servlet interface of the javax.servlet package.4. and is called only once for a servlet instance. The _jspservice(). It is the last method called n the servlet instance.The container calls the _jspservice() for each request.It is called before any other method. However the JSP specification has provided the HttpJspPage interfaec specifically for the JSp pages serving HTTP requests. Explain the life-cycle mehtods in JSP? THe generated servlet class for a JSP page implements the HttpJspPage interface of the javax.The container calls this when it decides take the instance out of service. The JspPage interface declares only two mehtods – jspInit() and jspDestroy() that must be implemented by all JSP pages regardless of the client-server protocol. This interface declares one method _jspService().servlet.The container calls the jspInit() to initialize te servlet instance. . The jspDestroy().