You are on page 1of 3

Java j2ee interview questions pdf

The runtime system guarantees that static initialization blocks are called in the order that they appear in the source code. We can not override any
private method because private methods can not be inherited and if method can not be inherited then method can not be overridden. Which class
does not override the equals and hashCode methods, inheriting them directly from class Object? Static variables are shared variables and doesn't
correspond to a specific object. Multithreading provides better interaction with the user by distribution of task 2. Which of the following code is
correct? Factory Pattern deals with creation of objects delegated to a separate factory class whereas Abstract Factory patterns works around a
super-factory which creates other factories. Session is meant for the same purpose as the cookie does. The thread that executes this method
cannot do anything elsewhile awaiting the arrival of another byte on the stream. Thanks for sharing informative article on java application
development. Builder is a creational Design Pattern whereas Composite is a structural design pattern. Yes but should follow "try" block then. As
the demand of quality web application keeps on increasing, the tool like Selenium IDE is getting very popular all over the world. A string buffer is
like a String, but can be modified. Person isn't necessary to have previous development understanding. This keyword is intended to aid in testing
and debugging. A static nested class is not an inner class, it's a top-level nested class. It refers to writing programs that execute across multiple
devices computers , in which the devices are all connected to each other using a network. The very first class is specially loaded with the help of
static main method declared in your class. What are different modules of spring? Can finally block throw an exception? Which function is used to
convert a JSON text into an object? Yes , we can have null values for columns in SQL. One more thing that quite differentiates between Cookie
and Session. HttpSession- places a limit on the number of sessions that can exist in memory. Byte char - java. The future of automation testing tool
is on the positive tool. Threads in Java can be implement either by Extending Thread class or implementing runnable interface. The outer class can
also access the members even private members of the nested class through an object of nested class. Can we reduce the visibility of the overridden
method? Which data types are supported by JSON? Difference between throw and throws? We can do that by pulling binary representation using
3 bits random 2. Map is an interface where HashMap is the concrete class. What is the scope for this class? Multiple servlets serving the request in
chain. Avoid surprises interviews need preparation. Part of JVM which is used to load classes and interfaces. In a case where there are no
instance variables what does the default constructor initialize? Difference between boolean and Boolean? Which of the following is tightly bound?
Will finally be called always if all code has been kept in try block? Can we declare class as protected? Session can be used to store both textual
information and objects. It is possible for programs to use up memory resources faster than they are garbage collected. What is a String Pool?
Nowadays Java EE comes up with rich enterprise software platform and provides lot of implementations. Java use import to include different
Classes and methods. Annotations that apply to other annotations are called meta-annotations.

J2EE Interview Questions & Answers

Adapter object has a different input than the real subject whereas Proxy object has the same input as the real subject. What is bean auto wiring?
Can we serialize static variables? LinkedList implements it with a doubly-linked list. The Set interface contains only methods inherited from
Collection and adds the restriction that duplicate elements are prohibited. The Java runtime environment deletes objects when it determines that
they are no longer being used. What will happen if we remove the static keyword from main method? A thread is a path of code execution in the
program, which has its own local variables, program counter pointer to current execution being executed and lifetime. What are use cases? This
annotation applies only to class declarations. But when an object invokes sleep method enters to not ready state. The syntax for doing this is:
Difference between Vector and ArrayList? The processor runs each thread for a short time and switches among the threads to simulate sim-
ultaneous execution context-switching and it make appears that each thread has its own processor. Public - Accessible from anywhere. Checked
exceptions and the exceptions for which compiler throws an errors if they are not checked whereas unchecked exceptions and caught during run
time only and hence can't be checked. The jsp scriptlet tag can only declare variables not methods whereas jsp declaration tag can declare
variables as well as methods. JMS Provides high-performance asynchronous messaging. Describe, in general, how java's garbage collector
works? All objects and classes have locks. Each mojo is an executable goal in Maven, and a plugin is a distribution of one or more related mojos.
When that memory is first allocated, however, the data it contains is unpredictable. Map - Contains Key , Value pairs. What is a Static import?
Heap Segment - contains all created objects in runtime, objects only plus their object attributes instance variables 3. Thanks for sharing this blog.
Static nested classes can have static members. If you know what class needs to be initialized , new is the optimized way of instantiating Class.
LDAP servers are hierarchical and are optimized for read access, so likely to be faster than database in providing read access. What is a
pageContext Object? It is also possible for programs to create objects that are not subject to garbage collection. Close is used to closes the
character output stream. The value received from hashcode is used as bucket number for storing elements. Suppose we want to visit a site for any
information, information can be represented in different languages like English,German or may be other and their format for presentation can also
differ from HTML to PDF or may be Plain text. Anonymous classes are defined in the new expression itself, so you cannot create multiple objects
of an anonymous class. A class's lock is acquired on the class's Class object. How can we create objects if we make the constructor private?
Number String Boolean Array Object null. Just like top-level classes, an inner class can extend a class or can implement interfaces. Lightweight
IoC containers tend to be lightweight, especially when compared to EJB containers, for example. This object stores references to the request and
response objects for each request. Close Dialog Are you sure? Global variables are not allowed as it wont fit good with the concept of
encapsulation. Enums were introduced with java 5. The Java runtime environment supports a garbage collector that periodically frees the memory
used by objects that are no longer needed. In case of local variables, they are stored in stack until they are being used. Best Selenium training
institute in Chennai. Hash code is generated to be used as hash key in some of the collections in Java and is calculated using string characters and
its length. What are different types of cookies? The View is rendered and the Dispatcher Servlet sends the output to the Servlet container. When a
thread terminates its processing, it enters the dead state.

Java / J2EE Interview Questions and Answers

What is singleton class? When the user queries the annotation type and the class has no annotation for this type, the class' superclass is queried for
the annotation type. A network socket is an endpoint of an inter-process communication flow across ibterview computer network. Is JVM a
overhead? Use one of your book credits to continue reading from where you left off, or restart the preview. Though we are intervoew to serialize
Java j2ee interview questions pdf object but we haven't declared the class to implement Serializable. The runtime system guarantees that static
initialization blocks are called in the order that they appear in the source code. You can find JVM - 32 bit or 64 bit by using System. Calendar ;
show Answer. What are different types of questioons classes? Hi Tks very much for post: The future of automation testing intfrview is on the
positive tool. The Questiions is rendered and the Dispatcher Servlet sends the output to the Servlet container. It is an abstract class that creates a
buffered character-output stream. You can put related classes together as a single logical group. Java j2ee interview questions pdf
implementation we can have is a List wherein we can place ordered words and hence can perform Java j2ee interview questions pdf Search.
Applet is a dynamic and interactive program that runs inside a web page displayed by a java capable browser. Intwrview is a final variable? That
would not be a problem java j2ee interview questions pdf both are specifying the contract that implement class has to follow. Initialization jspInit
method is invoked java j2ee interview questions pdf the container. Search - Binary Search and other optimized way of searching is not possible
on Linked List. Cookie and Session are used to store the user information. How we will make sure to be an object in multiple JVM? TreeMap
stores the Keys in order whereas HashMap stores the key value pairs randomly. Nowadays Java EE comes up with rich enterprise software
platform and provides lot of implementations. The properties class is a subclass of Hashtable that can be read from or written to a stream. Factory
is a creational design javaa whereas Strategy is behavioral design pattern. Mar 27 Will the static block be executed in the following code? In
Inheritance there is only one object in memory derived object whereas in Compositionparent object holds references of all composed objects.
Compiler provides a qufstions non parameterized constructor if no constructors is defined. Interfaces does't facilitate inheritance and hence
implementation of multiple interfaces doesn't make multiple inheritance. You're Reading a Free Preview Pages 2 to 8 are not shown in this preview.
New operator in Java creates objects. String pool String intern pool is a special storage area in Java heap. Static nested classes can have static
members. What is the lifecycle of quesitons applet?