Вы находитесь на странице: 1из 8

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.

com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

JP Morgan Technical Latest Sample Placement Paper


1. What is method overriding? ANS: Overriding has same method name, identical arguments used in subclass. 2. What is singleton class? ANS: Singleton class means that any given time only one instance of the class is present, in one JVM. 3. How many jobs can be run concurrently on MVT? ANS: 15 jobs. 4. What is a constructor? ANS: In Java, the class designer can guarantee initialization of every object by providing a special method called a constructor. If a class has a constructor, Java automatically calls that constructor when an object is created, before users can even get their hands on it. So initialization is guaranteed. 5. What is the difference between an array and a vector? ANS: Number of elements in an array is fixed at the construction time, whereas the number of elements in vector can grow dynamically. 6. What has triggered the need for multitasking in PCs? ANS: Increased speed and memory capacity of microprocessors together with the support fir virtual memory and Growth of client server computing 7. What is casting? ANS: Conversion of one type of data to another when appropriate. Casting makes explicitly converting of data. 8. What is page cannibalizing? ANS: Page swapping or page replacements are called page cannibalizing.
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

9. What is the difference between final, finally and finalize? ANS: The modifier final is used on class variable and methods to specify certain behavior explained above. And finally is used as one of the loop in the try catch blocks, It is used to hold code that needs to be executed whether or not the exception occurs in the try catch block. Java provides a method called finalize ( ) that can be defined in the class. When the garbage collector is ready to release the storage end for your object, it will first call finalize ( ), and only on the next garbagecollection pass will it reclaim the objects memory. So finalize ( ), gives you the ability to perform some important cleanup at the time of garbage collection. 10. What are demand- and pre-paging? ANS: With demand paging, a page is brought into memory only when a location on that page is actually referenced during execution. With prepaging, pages other than the one demanded by a page fault are brought in. The selection of such pages is done based on common access patterns, especially for secondary memory devices. Paging a memory management function, while multiprogramming a processor management functions, are the two interdependent? Yes. 11. What are packages? ANS: A package is a collection of related classes and interfaces providing access protection and namespace management. 12. In the context of memory management, what are placement and replacement algorithms? ANS: Placement algorithms determine where in available real-memory to load a program. Common methods are first-fit, next-fit and best-fit. Replacement algorithms are used when memory is full, and one process (or part of a process) needs to be swapped out to accommodate a new program. The replacement algorithm determines which the partitions to be swapped out are.
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

13. What is meant by a Thread? ANS: Thread is defined as an instantiated parallel process of a given program. 14. What are some advantages and disadvantages of Java Sockets? ANS: Advantages of Java Sockets: Sockets are flexible and sufficient. Efficient socket based programming can be easily implemented for general communications. Sockets cause low network traffic. Unlike HTML forms and CGI scripts that generate and transfer whole web pages for each new request, Java applets can send only necessary updated information. 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, and to nowhere else on the network. Despite all of the useful and helpful Java features, Socket based communications allows only to send packets of raw data between applications. Both the client-side and server-side have to provide mechanisms to make the data useful in any way. Since the data formats and protocols remain application specific, the re-use of socket based implementations is limited. 15. What is deadlock? ANS: Deadlock is a situation when two threads are waiting on each other to release a resource. Each thread waiting for a resource which is held by the other waiting thread. In Java, this resource is usually the object lock obtained by the synchronized keyword. 16. What is a super class and how can you call a super class? ANS: When a class is extended that is derived from another class there is a relationship is created, the parent class is referred to as the super class by the derived class that is the child. The derived class can make a call to the super class using the keyword super. If used in the constructor of the derived class it has to be the first statement.
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

17. Describe the Buddy system of memory allocation. ANS: Free memory is maintained in linked lists, each of equal sized blocks. Any such block is of size 2^k. When some memory is required by a process, the block size of next higher order is chosen, and broken into two. Note that the two such pieces differ in address only in their kth bit. Such pieces are called buddies. When any used block is freed, the OS checks to see if its buddy is also free. If so, it is rejoined, and put into the original free-block linked-list. 18. What is encapsulation technique? ANS: Hiding data within the class and making it available only through the methods. This technique is used to protect your class against accidental changes to fields, which might leave the class in an inconsistent state. 19. What are local and global page replacements? ANS: Local replacement means that an incoming page is brought in only to the relevant process' address space. Global replacement policy allows any page frame from any process to be replaced. The latter is applicable to variable partitions model only. 20. What are the most common techniques for reusing functionality in object-oriented systems? ANS: The two most common techniques for reusing functionality in object-oriented systems are class inheritance and object composition. Class inheritance lets you define the implementation of one class in terms of anothers. Reuse by sub classing is often referred to as whitebox reuse. Object composition is an alternative to class inheritance. Here, new functionality is obtained by assembling or composing objects to get more complex functionality. This is known as black-box reuse. 21. What language is used by a relational model to describe the structure of a database? ANS: The Data Definition Language.
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

22. Define latency, transfer and seek time with respect to disk I/O. ANS: Seek time is the time required to move the disk arm to the required track. Rotational delay or latency is the time it takes for the beginning of the required sector to reach the head. Sum of seek time (if any) and latency is the access time. Time taken to actually transfer a span of data is transfer time. 23. What is a trap and trapdoor? ANS: Trapdoor is a secret undocumented entry point into a program used to grant access without normal methods of access authentication. A trap is a software interrupt, usually the result of an error condition. 24. What is JSP? Describe its concept. ANS: JSP is Java Server Pages. The Java Server Page concept is to provide an HTML document with the ability to plug in content at selected locations in the document. 25. When does the condition 'rendezvous' arise? ANS: In message passing, it is the condition in which, both, the sender and receiver are blocked until the message is delivered. 26. What does the JSP engine do when presented with a JavaServer Page to process? ANS: The JSP engine builds a servlet. The HTML portions of the JavaServer Page become Strings transmitted to print methods of a PrintWriter object. The JSP tag portions result in calls to methods of the appropriate JavaBean class whose output is translated into more calls to a println method to place the result in the HTML document. 27. What is JSP? Describe its concept. ANS: JSP is a technology that combines HTML/XML markup languages and elements of Java programming Language to return dynamic content to the Web client; It is normally used to handle Presentation logic of a web application, although it may have business logic.
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

28. What is short-, long- and medium-term scheduling? ANS: Long term scheduler determines which programs are admitted to the system for processing. It controls the degree of multiprogramming. Once admitted, a job becomes a process. Medium term scheduling is part of the swapping function. This relates to processes that are in a blocked or suspended state. They are swapped out of real-memory until they are ready to execute. The swapping-in decision is based on memory-management criteria. Short term scheduler, also known as a dispatcher executes most frequently, and makes the finest-grained decision of which process should execute next. This scheduler is invoked whenever an event occurs. It may lead to interruption of one process by preemption. 29. What is busy waiting? ANS: The repeated execution of a loop of code while waiting for an event to occur is called busy-waiting. The CPU is not engaged in any real productive activity during this period, and the process does not progress toward completion. 30. What are the lifecycle phases of a JSP? ANS: JSP page looks like a HTML page but is a servlet. When presented with JSP page the JSP engine does the following 7 phases. Page translation: -page is parsed, and a java file which is a servlet is created. Page compilation: page is compiled into a class file Page loading: This class file is loaded. Create an instance :- Instance of servlet is created, jspInit() method is called, _jspService is called to handle service calls _jspDestroy is called to destroy it when the servlet is not required. 31. What is an Expression? ANS: Expressions are act as place holders for language expression; expression is evaluated each time the page is accessed.
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

32. What is a translation unit? ANS: JSP page can include the contents of other HTML pages or other JSP files. This is done by using the include directive. When the JSP engine is presented with such a JSP page it is converted to one servlet class and this is called a translation unit, Things to remember in a translation unit is that page directives affect the whole unit, one variable declaration cannot occur in the same unit more than once, the standard action jsp: useBean cannot declare the same bean twice in one unit. 33. What is the resident set and working set of a process? ANS: Resident set is that portion of the process image that is actually in real-memory at a particular instant. Working set is that subset of resident set that is actually needed for execution. (Relate this to the variable-window size method for swapping techniques.) 34. How is JSP used in the MVC model? ANS: JSP is usually used for presentation in the MVC pattern (Model View Controller) i.e. it plays the role of the view. The controller deals with calling the model and the business classes which in turn get the data, this data is then presented to the JSP for rendering on to the client. 35. What is the Translation Lookaside Buffer (TLB)? ANS: In a cached system, the base addresses of the last few referenced pages is maintained in registers called the TLB that aids in faster lookup. TLB contains those page-table entries that have been most recently used. Normally, each virtual memory reference causes 2 physical memory accesses-- one to fetch appropriate page-table entry, and one to fetch the desired data. Using TLB in-between, this is reduced to just one physical memory access in cases of TLB-hit. 36. What are context initialization parameters? ANS: Context initialization parameters are specified by the in the
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

web.xml file, these are initialization parameter for the whole application and not specific to any servlet or JSP. 37. What is an output comment? ANS: A comment that is sent to the client in the viewable page source. The JSP engine handles an output comment as un-interpreted HTML text, returning the comment in the HTML output sent to the client. You can see the comment by viewing the page source from your Web browser. 38. What are the typical elements of a process image? ANS: User data: Modifiable part of user space. May include program data, user stack area, and programs that may be modified. User program: The instructions to be executed. System Stack: Each process has one or more LIFO stacks associated with it. Used to store parameters and calling addresses for procedure and system calls. Process control Block (PCB): Info needed by the OS to control processes. 39. What is a Hidden Comment? ANS: A comment that documents the JSP page but is not sent to the client. The JSP engine ignores a hidden comment, and does not process any code within hidden comment tags. A hidden comment is not sent to the client, either in the displayed JSP page or the HTML page source. The hidden comment is useful when you want to hide or comment out part of your JSP page. 40. What are the stipulations of C2 level security? ANS: C2 level security provides for: Discretionary Access Control Identification and Authentication Auditing Resource reuse
Visit www.latestoffcampus.com for placement papers, interview tips & job updates. To get free updates to mail http://groups.google.com/group/latestoffcampus/subscribe Live updates on Facebook @ www.facebook.com/LatestOffCampus

Вам также может понравиться