Top Banner
Data Structures Interview Questions 1. How can I search for data in a linked list? Unfortunately, the only way to search a linked list is with a linear search, because the only way a linked list’s members can be accessed is sequentially. Sometimes it is quicker to take the data from a linked list and store it in a different data structure so that searches can be more efficient 2. What is impact of signed numbers on the memory? Sign of the number is the first bit of the storage allocated for that number. So you get one bit less for storing the number. For example if you are storing an 8-bit number, without sign, the range is 0-255. If you decide to store sign you get 7 bits for the number plus one bit for the sign. So the range is -128 to +127. 3. What is precision? Precision refers the accuracy of the decimal portion of a value. Precision is the number of digits allowed after the decimal point. 4. What is the data structures used to perform recursion? Stack. Because of its LIFO (Last In First Out) property it remembers its caller so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used. 5. What is placement new? When you want to call a constructor directly, you use the placement new. Sometimes you have some raw memory that’s already been allocated, and you need to construct an object in the memory you have. Operator new’s special version placement new allows you
135

All Types of Interview Questions

Dec 11, 2015

Download

Documents

Karthik Reddy

dhgdfasj dfhafja afjajfjah hahja jgjlakg
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: All Types of Interview Questions

Data Structures Interview Questions

1. How can I search for data in a linked list?

Unfortunately, the only way to search a linked list is with a linear search, because the only way a linked list’s members can be accessed is sequentially. Sometimes it is quicker to take the data from a linked list and store it in a different data structure so that searches can be more efficient

2. What is impact of signed numbers on the memory?

Sign of the number is the first bit of the storage allocated for that number. So you get one bit less for storing the number. For example if you are storing an 8-bit number, without sign, the range is 0-255. If you decide to store sign you get 7 bits for the number plus one bit for the sign. So the range is -128 to +127.

3. What is precision?

Precision refers the accuracy of the decimal portion of a value. Precision is the number of digits allowed after the decimal point.

4. What is the data structures used to perform recursion?

Stack. Because of its LIFO (Last In First Out) property it remembers its caller so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.

5. What is placement new?

When you want to call a constructor directly, you use the placement new. Sometimes you have some raw memory that’s already been allocated, and you need to construct an object in the memory you have. Operator new’s special version placement new allows you to do it.class Widget{public :Widget(int widgetsize);…Widget* Construct_widget_int_buffer(void *buffer,int widgetsize){return new(buffer) Widget(widgetsize);}};This function returns a pointer to a Widget object that’s constructed within the buffer passed to the function. Such a function might be useful for applications using shared memory or memory-

Page 2: All Types of Interview Questions

mapped I/O, because objects in such applications must be placed at specific addresses or in memory allocated by special routines.

6. What is the easiest sorting method to use?

The answer is the standard library function qsort(). It’s the easiest sort by far for several reasons:It is already written.It is already debugged.It has been optimized as much as possible (usually).Void qsort(void *buf, size_t num, size_t size, int (*comp)(const void *ele1, const void *ele2));

7. What is a node class?

A node class is a class that, relies on the base class for services and implementation, provides a wider interface to users than its base class, relies primarily on virtual functions in its public interface depends on all its direct and indirect base class can be understood only in the context of the base class can be used as base for further derivation

Can be used to create objects. A node class is a class that has added new services or functionality beyond the services inherited from its base class

8. What is the quickest sorting method to use?

The answer depends on what you mean by quickest. For most sorting problems, it just doesn’t matter how quick the sort is because it is done infrequently or other operations take significantly more time anyway. Even in cases in which sorting speed is of the essence, there is no one answer. It depends on not only the size and nature of the data, but also the likely order. No algorithm is best in all cases. There are three sorting methods in this author’s toolbox that are all very fast and that are useful in different situations. Those methods are quick sort, merge sort, and radix sort.

The Quick SortThe quick sort algorithm is of the divide and conquer type. That means it works by reducing a sorting problem into several easier sorting problems and solving each of them. A dividing value is chosen from the input data, and the data is partitioned into three sets: elements that belong before the dividing value, the value itself, and elements that come after the dividing value. The partitioning is performed by exchanging elements that are in the first set but belong in the third with elements that are in the third set but belong in the first Elements that are equal to the dividing element can be put in any of the three sets the algorithm will still work properly.

The Merge SortThe merge sort is a divide and conquer sort as well. It works by considering the data to be sorted as a sequence of already-sorted lists (in the worst case, each list is one element long). Adjacent sorted lists are merged into larger sorted lists until there is a single sorted list containing all the elements. The merge sort is good at sorting lists and other data structures that are not in arrays,

Page 3: All Types of Interview Questions

and it can be used to sort things that don’t fit into memory. It also can be implemented as a stable sort.

The Radix SortThe radix sort takes a list of integers and puts each element on a smaller list, depending on the value of its least significant byte. Then the small lists are concatenated, and the process is repeated for each more significant byte until the list is sorted. The radix sort is simpler to implement on fixed-length data such as ints.

9.How can I search for data in a linked list?

Unfortunately, the only way to search a linked list is with a linear search, because the only way a linked list’s members can be accessed is sequentially. Sometimes it is quicker to take the data from a linked list and store it in a different data structure so that searches can be more efficient.

C++ Interview Questions

1 What is a class?

Ans: Class is a user-defined data type in C++. It can be created to solve a particular kind of problem. After creation the user need not know the specifics of the working of a class.

2 What is an object?

Ans: Object is a software bundle of variables and related methods. Objects have state and behavior.

3 What is a template?

Ans: Templates allow to create generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types. Until certain point they fulfill the functionality of a macro. Its prototype is any of the two following ones: template function_declaration; template function_declaration;

The only difference between both prototypes is the use of keyword class or typename, its use is indistinct since both expressions have exactly the same meaning and behave exactly the same way.

4 What is abstraction?

Ans: Abstraction is of the process of hiding unwanted details from the user.

Page 4: All Types of Interview Questions

5 What is virtual constructors/ destructors?

Ans:  Virtual destructors: If an object (with a non-virtual destructor) is destroyed explicitly by applying the delete operator to a base-class pointer to the object, the base-class destructor function (matching the pointer type) is called on the object. There is a simple solution to this problem – declare a virtual base-class destructor. This makes allderived-class destructors virtual even though they don’t have the same name as the base-class destructor. Now, if the object in the hierarchy is destroyed explicitly by applying the delete operator to a base-class pointer to a derived-class object, the destructor for the appropriate class is called. Virtual constructor: Constructors cannot be virtual. Declaring a constructor as a virtual function is a syntax error. Does c++ support multilevel andmultiple inheritance? Yes. What are the advantages of inheritance?• It permits code reusability.• Reusability saves time in program development.• It encourages the reuse of proven and debuggedhigh-quality software, thus reducing problem after a system becomes functional. What is the difference between declaration and definition? The declaration tells the compiler that at some later point we plan to present the definition of this declaration. E.g.: void stars () //function declaration The definition contains the actual implementation.E.g.: void stars () // declarator{for(int j=10; j>=0; j–) //function bodycout<<”*”;cout<}

6 what is the difference between an object and a class?

Ans:Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects.

Ø A Class is static. All of the attributes of a class are fixed before, during, and after theexecution of a program. The attributes of a class don’t change.

Ø The class to which an object belongs is also (usually) static. If a particular object belongs to a certain class at the time that it is created then it almost certainly will still belong to that class right up until the time that it is destroyed.

Ø An Object on the other hand has a limited lifespan. Objects are created and eventuallydestroyed. Also during that lifetime, the attributes of the object may undergo significant change.

7 What is the difference between class and structure?

Ans: Structure: Initially (in C) a structure was used to bundle different type of data types together to perform a particular functionality. But C++ extended the structure to contain functions also.

Page 5: All Types of Interview Questions

The major difference is that all declarations inside a structure are by default public. Class: Class is a successor of Structure. By default all the members inside the class are private.

8 What is virtual class and friend ?

Ans: Friend classes are used when two or more classes are designed to work together and need access to each other’s implementation in ways that the rest of the world  shouldn’t be allowed to have. In other words, they help keep private things private. For instance, it may be desirable for class Database Cursor to have more privilege to the internals of class Database than main() has.

9 What is polymorphism? Explain with an example?

Ans:”Poly” means “many” and “morph” means “form”. Polymorphism is the ability of an object (or reference) to assume (be replaced by) or become many different forms of object. Example: function overloading, function overriding, virtual functions. Another example can be a plus ‘+’ sign, used for adding two integers or for using it to concatenate two strings.

10 What is public, protected, private?

Ans:Public, protected and private are three access specifiers in C++.Ø Public data members and member functions are accessible outside the class.Ø Protected data members and member functions are only available to derived classes.Ø Private data members and member functions can’t be accessed outside the class. However there is an exception can be using friend classes.

11 What is RTTI?

Ans: Runtime type identification (RTTI) lets you find the dynamic type of an object when you have only a pointer or a reference to the base type. RTTI is the official way in standard C++ to discover the type of an object and to convert the type of a pointer or reference (that is, dynamic typing). The need came from practical experience with C++. RTTI replaces many homegrown versions with a solid, consistent approach.

12 What is friend function?

Ans: As the name suggests, the function acts as a friend to a class. As a friend of a class, it can access its private and protected members. A friend function is not a member of the class. But it must be listed in the class definition.

13 What is function overloading and operator overloading?

Ans: Function overloading: C++ enables several functions of the same name to be defined, as long as these functions have different sets of parameters (at least as far as their types are concerned). This capability is called function overloading. When an overloaded function is called, the C++ compiler selects the proper function by examining the number, types and order of the arguments in the call. Function overloading is commonly used to create several functions

Page 6: All Types of Interview Questions

of the same name that perform similar tasks but on different data types. Operator overloading allows existing C++ operators to be redefined so that they work on objects of user-defined classes. Overloaded operators are syntactic sugar for equivalent function calls. They form a pleasant facade that doesn’t add anything fundamental to the language (but they can improve understandability and reduce maintenance costs).

14 What is namespace?

Ans: Namespaces allow us to group a set of global classes, objects and/or functions under a name. To say it somehow, they serve to split the global scope in sub-scopes known as namespaces. The form to use namespaces is: namespace identifier { namespace-body } Where identifier is any valid identifier and namespace-body is the set of classes, objects and functions that are included within the namespace.

For example:

namespace general { int a, b; } In this case, a and b are normal variables integrated within the general namespace. In order to access to these variables from outside the namespace we have to use the scope operator.

For example: to access the previous variables we would have to put: general’s general::b The functionality of namespaces is specially useful in case that there is a possibility that a global object or function can have the same name than another one, causing a redefinition error.

15 What do you mean by inline function?

Ans:The idea behind inline functions is to insert the code of a called function at the point where the function is called. If done carefully, this can improve the application’s performance in exchange for increased compile time and possibly (but not always) an increase in the size of the generated binary executables.

16 What do you mean by pure virtual functions?

Ans:Answer A pure virtual member function is a member function that the base class forces derived classes to provide. Normally these member functions have no implementation. Pure virtual functions are equated to zero. class Shape { public: virtual void draw() = 0;};

17 What is a scope resolution operator?

Ans: A scope resolution operator (::), can be used to define the member functions of a class outside the class.

18 Difference between realloc() and free()?

Page 7: All Types of Interview Questions

Ans: The free subroutine frees a block of memory previously allocated by the malloc subroutine. Undefined results occur if the Pointer parameter is not a valid pointer. If the Pointer parameter is a null value, no action will occur. The realloc subroutine changes the size of the block of memory pointed to by the Pointer parameter to the number of bytes specified by the Size parameter and returns a new pointer to the block. The pointer specified by the Pointer parameter must have been created with the malloc, calloc, or realloc subroutines and not been deal located with the free or realloc subroutines. Undefined results occur if the Pointer parameter is not a valid pointer.

19 What are virtual functions?

Ans: A virtual function allows derived classes to replace the implementation provided by the base class. The compiler makes sure the replacement is always called whenever the object in question is actually of the derived class, even if the object is accessed by a base pointer rather than a derived pointer. This allows algorithms in the base class to be replaced in the derived class, even if users don’t know about the derived class.

20 Explain kill() and its possible return values?

Ans:There are four possible results from this call: ‘kill()’ returns 0. This implies that a process exists with the given PID, and the system would allow you to send signals to it. It is system-dependent whether the process could be a zombie. ‘kill()’ returns -1, ‘errno == ESRCH’ either no process exists with the given PID, or security enhancements are causing the system to deny its existence. (On some systems, the process could be a zombie.) ‘kill()’ returns -1, ‘errno == EPERM’ the system would not allow you to kill the specified process. This means that either the process exists (again, it could be a zombie) or draconian security enhancements are present (e.g. your process is not allowed to send signals to *anybody*). ‘kill()’ returns -1, with some other value of ‘errno’ you are in trouble! The most-used technique is to assume that success or failure with ‘EPERM’ implies that the process exists, and any other error implies that it doesn’t. An alternative exists, if you are writing specifically for a system (or all those systems) that provide a ‘/proc’ filesystem: checking for the existence of ‘/proc/PID’ may work.

C Interview Questions

1 what is the difference between a while statement and a do statement?

Ans: A while statement checks at the beginning of a loop to see whether the next loop iteration should occur. A do statement checks at the end of a loop to see whether the next iteration of a loop should occur. The do statement will always execute the body of a loop at least once.

2 what is the difference between a break statement and a continue statement?

Page 8: All Types of Interview Questions

Ans: A break statement results in the termination of the statement to which it applies (switch, for, do, or while). A continue statement is used to end the current loop iteration and return control to the loop statement.

3 what does break and continue statements do?

Ans: Continue statement continues the current loop (if label not specified) in a new iteration whereas break statement exits the current loop.

4 how can you tell what shell you are running on unix system?

Ans: You can do the Echo $RANDOM. It will return a undefined variable if you are from the C-Shell, just a return prompt if you are from the Bourne shell, and a 5 digit random numbers if you are from the Korn shell. You could also do a ps -l and look for the shell with the highest PID.

5 what is the difference between a pointer and a reference?

Ans: You can do the Echo $RANDOM. It will return a undefined variable if you are from the C-Shell, just a return prompt if you are from the Bourne shell, and a 5 digit random numbers if you are from the Korn shell. You could also do a ps -l and look for the shell with the highest PID.

6 How do you print an address?

Ans: The safest way is to use printf() (or fprintf() or sprintf()) with the %P specification. That prints a void pointer (void*). Different compilers might print. a pointer with different formats. Your compiler will pick a format that’s right for your environment. If you have some other kind of pointer (not a void*) and you want to be very safe, cast the pointer to a void*:  printf( “%Pn”, (void*) buffer ).

7 Can math operations be performed on a void pointer?

Ans: No. Pointer addition and subtraction are based on advancing the pointer by a number of elements. By definition, if you have a void pointer, you don’t know what it’s pointing to, so you don’t know the size of what it’s pointing to. If you want pointer arithmetic to work on raw addresses, use character pointers.

8 How can you determine the size of an allocated portion of memory?

Ans: You can’t, really. free() can , but there’s no way for your program to know the trick free() uses. Even if you disassemble the library and discover the trick, there’s no guarantee the trick won’t change with the next release of the compiler.

9 what is a null pointer?

Ans: There is times when it’s necessary to have a pointer that doesn’t point to anything. The macro NULL, defined in , has a value that’s guaranteed to be different from any valid pointer.

Page 9: All Types of Interview Questions

NULL is a literal zero, possibly cast  to void* or char*. Some people, notably C++ programmers, prefer to use 0 rather than NULL.

The null pointer is used in three ways:1) To stop indirection in a recursive data structure2) As an error value3) As a sentinel value.

10 Is NULL always defined as 0?

Ans: NULL is defined as either 0 or (void*)0. These values are almost identical; either a literal zero or a void pointer is converted automatically to any kind of pointer, asNecessary, whenever a pointer is needed (although the compiler can’t always tell when a pointer is needed).

11 Difference between arrays and pointers?

Ans: Pointers are used to manipulate data using the address. Pointers use * operator to access the data pointed to by them.Arrays use subscripted variables to access and manipulate data. Array variables can beEquivalently written using pointer expression.

12 Are pointers integers?

Ans: pointers are not integers. A pointer is an address. It is merely a positive number and not an integer.

13 How are pointer variables?

Ans: Pointer variable are initialized by one of the following two waysStatic memory allocationDynamic memory allocation.

14 What are the advantages of the pointer?

Ans: Debugging is easierIt is easier to understand the logic involved in the programTesting is easierRecursive call is possibleIrrelevant details in the user point of view are hidden in functions

Functions are helpful in generalizing the Program

15 What is a pointer value and Address?

Page 10: All Types of Interview Questions

Ans: A pointer value is a data object that refers to a memory location. Each memory location is numbered in the memory. The number attached to a memory location is called the address of the location.

16 What is a pointer variable?

Ans: A pointer variable is a variable that may contain the address of another variable or any valid address in the memory.

17 What is static memory allocation and dynamic memory allocation?

Ans: Static memory allocation: The compiler allocates the required memory space for a declared variable. By using the address of operator, the reserved address is obtained and this address may be assigned to a pointer variable. Since most of the declared variableHave static memory, this way of assigning pointer value to a pointer variable is known as static memory allocation. Memory is assigned during compilation time.

Dynamic memory allocation: It uses functions such as malloc ( ) or calloc ( ) to get memory dynamically. If these functions are used to get memory dynamically and the values returned by these functions are assigned to pointer variables, such assignments are known as dynamic memory allocation. Memory is assigned during run time.

18 What is the purpose of main ( )

Ans: The function main ( ) invokes other functions within it. It is the first function toBe called when the program starts execution.It is the starting functionIt returns an int value to the environment that called the programRecursive call is allowed for main ( ) also.It is a user-defined functionProgram execution ends when the closing brace of the function main ( ) is reached.It has two arguments 1) argument count and 2) argument vector (represents strings passed).Any user-defined name can also be used as parameters for main ( ) instead of argc and argv

19 What is the purpose of realloc ( )?

Ans: The function realloc (ptr, n) uses two arguments. the first argument ptr is a pointer to a block of memory for which the size is to be altered. The second argument n specifies the new size. The size may be increased or decreased. If n is greater than the old size andIf sufficient space is not available subsequent to the old region, the function realloc ( )may create a new region and all the old data are moved to the new region.

20 What are the advantages of auto variables?

Ans: 1) The same auto variable name can be used in different blocks2) There is no side effect by changing the values in the blocks

Page 11: All Types of Interview Questions

3) The memory is economically used4) Auto variables have inherent protection because of local scope.

HTML Interview Questions

How to learn HTML:

INTRODUCTION

Definition of HTML.

*HTML means Hyper Text Markup Language*An HTML file can be created by using a simple text editor*An HTML file must have an htm or html file extension*An HTML file is a text file containing small markup tags

*The markup tags tell the Web browser how to display the pageIf we want to try HTML then……………..

*First we have to start running windows and start notepad

*If we are on a Mac, start Simple Text

Rules for HTML program…………….

*The program contains mainly three tags they are

1.html2.head3.body

*Every tag should contain one open tag and close tag

EXAMPLE 1 :

<html><head></head><body></body></html>

Page 12: All Types of Interview Questions

< > this is open tag and </ > this is closed tag

1. Head tag contains only titles of the website, documents, pages etc……………2.  What we want as output we need to write in body tag.

EXAMPLE 2 :<html><head><title>SRIHITHA TECHNOLOGIES</TITLE><style type=”text/css”><!–.style1 {color: #FF0000}–></style></head><body>

<h1 align=”center” :=”" red=”">SRIHITHA TECHNOLOGIES</h1><b><u><ol type = “a”> OFFERED COURSES </u></b><h3><li>SEO</li><li>PHP</li><li>JAVA</li><li>WEB DESIGNING</li><li>C,C++</li></h3>

</body><html>

*another important thing is that we have to save the file as “name.html”.

How to start an html program:

First we have to start our internet browser . Select “Open”in the File menu of your browser.

A dialog box is opened.select file and locate the HTML file (“name.html”) just you created, select it

And open. Now you see an address in the dialog box like “C:\Mycomputer\name.html”. then the browser will display the page

Explanation for example 2:

The first tag in our HTML document is  “ <html>’’. This tag tells to our browser that thisis the start of an HTML document.

Page 13: All Types of Interview Questions

The last tag in our closed HTML document(</html>). This tag is for “END” symble.

Some more HTML TAGS

1. <h1>and</h1>, from h1 to h6

Hear h1 tag is header tag and h6 tag is lower tag

2.<b>and</b>

<b> is used for bold the document

3.<u>and</u>

<u> is for under line the document

4.<i>and</i>

<i> is for italic

5.<ol>and</ol>

<ol> is called order list

6.<ul>and</ul><ul> is called unorderlist

7.<p>and</p>It is used for to start a paragraph

8.<br>It is used for to break aline

9.<li>and</li>This is called list

Note: <br> tag has no closing tag

Hibernate Interview Questions

1.What does ORM consists of ?

Page 14: All Types of Interview Questions

An ORM solution consists of the following four pieces:

* API for performing basic CRUD operations* API to express queries referring to classes* Facilities to specify meta data* Optimization facilities : dirty checking,lazy associations fetching

2.What is Hibernate?

Hibernate is a pure Java object-relational mapping (ORM) and persistence framework that allows you to map plain old Java objects to relational database tables using (XML) configuration files.Its purpose is to relieve the developer from a significant amount of relational data persistence-related programming tasks.

3.Why do you need ORM tools like hibernate?

The main advantage of ORM like hibernate is that it shields developers from messy SQL. Apart from this, ORM provides following benefits:

* Improved productivityo High-level object-oriented APIo Less Java code to writeo No SQL to write* Improved performanceo Sophisticated cachingo Lazy loadingo Eager loading* Improved maintainabilityo A lot less code to write* Improved portabilityo ORM framework generates database-specific SQL for you

4.What are the most common methods of Hibernate configuration?

The most common methods of Hibernate configuration are:

* Programmatic configuration* XML configuration (hibernate.cfg.xml)

5.What role does the Session interface play in Hibernate?

The Session interface is the primary interface used by Hibernate applications. It is a single-threaded, short-lived object representing a conversation between the application and the persistent store. It allows you to create query objects to retrieve persistent objects.

Session session = session Factory.open Session();

Page 15: All Types of Interview Questions

Session interface role:

* Wraps a JDBC connection* Factory for Transaction* Holds a mandatory (first-level) cache of persistent objects, used when navigating the object graph or looking up objects by identifier

6.What is the general flow of Hibernate communication with RDBMS?

The general flow of Hibernate communication with RDBMS is :

* Load the Hibernate configuration file and create configuration object. It will automatically load all hbm mapping files* Create session factory from configuration object* Get one session from this session factory* Create HQL Query* Execute query to get list containing Java objects

7.What role does the Session Factory interface play in Hibernate?

The application obtains Session instances from a Session Factory. There is typically a single Session Factory for the whole application—created during application initialization. The Session Factory caches generate SQL statements and other mapping meta data that Hibernate uses at runtime. It also holds cached data that has been read in one unit of work and may be reused in a future unit of work

Session Factory session Factory = configuration.build Session Factory();

8.What Does Hibernate Simplify?

Hibernate simplifies:

* Saving and retrieving your domain objects* Making database column and table name changes* Centralizing pre save and post retrieve logic* Complex joins for retrieving related items* Schema creation from object model

9.Define cascade and inverse option in one-many mapping?

cascade – enable operations to cascade to child entities.cascade=”all|none|save-update|delete|all-delete-orphan”

inverse – mark this collection as the “inverse” end of a bidirectional association.inverse=”true|false”Essentially “inverse” indicates which end of a relationship should be ignored, so when persisting

Page 16: All Types of Interview Questions

a parent who has a collection of children, should you ask the parent for its list of children, or ask the children who the parents are?

10.What are the benefits does Hibernate Template provide?

The benefits of Hibernate Template are :

* Hibernate Template, a Spring Template class simplifies interactions with Hibernate Session.* Common functions are simplified to single method calls.* Sessions are automatically closed.* Exceptions are automatically caught and converted to runtime exceptions.

AJAX Interview Questions

AJAX Interview Tips

AJAX stands for Asynchronous JavaScript and XML.

AJAX is a type of programming made popular in 2005 by Google (with Google Suggest).

AJAX is not a new programming language, but a new way to use existing standards.

With AJAX you can create better, faster, and more user-friendly web applications.

AJAX is based on JavaScript and HTTP requests

Ajax, or AJAX (Asynchronous JavaScript and XML), is a group of interrelated web development techniques used to create interactive web applications or rich Internet applications. With Ajax, web applications can retrieve data from the server asynchronously in the background without interfering with the display and behavior of the existing page. The use of Ajax has led to an increase in interactive animation on web pages. Data is retrieved using the XML Http Request object or through the use of Remote Scripting in browsers that do not support it. Despite the name, the use of JavaScript and XML is not actually required, nor do the requests need to be asynchronous.

Advantages OF Ajax

In many cases, related pages on a website consist of much content that is common between them. Using traditional methods, that content would have to be reloaded on every request. However, using Ajax, a web application can request only the content that needs to be updated, thus drastically reducing bandwidth usage and load time. The use of asynchronous requests allows the client’s Web browser UI to be more interactive and to respond quickly to inputs, and sections of

Page 17: All Types of Interview Questions

pages can also be reloaded individually. Users may perceive the application to be faster or more responsive, even if the application has not changed on the server side. The use of Ajax can reduce connections to the server, since scripts and style sheets only have to be requested once.

Disadvantages of Ajax.

Pages dynamically created using successive Ajax requests do not automatically register themselves with the browser’s history engine, so clicking the browser’s “back” button may not return the user to an earlier state of the Ajax-enabled page, but may instead return them to the last full page visited before it.

Workarounds include the use of invisible IFrames to trigger changes in the browser’s history and changing the anchor portion of the URL (following a #) when AJAX is run and monitoring it for changes.

Dynamic web page updates also make it difficult for a user to bookmark a particular state of the application. Solutions to this problem exist, many of which use the URL fragment identifier (the portion of a URL after the ‘#’) to keep track of, and allow users to return to, the application in a given state.

Because most web crawlers do not execute JavaScript code, web applications should provide an alternative means of accessing the content that would normally be retrieved with Ajax, to allow search engines to index it.

Any user whose browser does not support Ajax or JavaScript, or simply has JavaScript disabled, will not be able to use its functionality. Similarly, devices such as mobile phones, PDAs, and screen readers may not have support for JavaScript or the XMLHttp Request object. Also, screen readers that are able to use Ajax may still not be able to properly read the dynamically generated content.

The only way to let the user carry out functionality is to fall back to non-JavaScript. This can be achieved by making sure links and forms can be resolved properly and rely not solely on Ajax. In JavaScript, form submission could then be halted with “return false”.

The same origin policy prevents Ajax from being used across domains, although the W3C has a draft that would enable this functionality.

The lack of a standards body behind Ajax means there is no widely adopted best practice to test Ajax applications. Testing tools for Ajax often do not understand Ajax event models, data models, and protocols. Opens up another attack vector for malicious code that web developers might not fully test for.

Accounting Interview Questions

Page 18: All Types of Interview Questions

Tips on Interview gives many advices to Accounting Professionals, the following are the sample questions Accounting Professionals need to prepare before attending for Interview.

Questing asked in Interview for Accounting professionals1.What was the size of the company you were working for?2.What was your Title in the company?3.What type of environment suits you best and explain the reason?4.What is your educational Back Ground?5.How large was the accounting Group?6.What product or service did your company provide or Produce?7.Tell me a situation where you made Mistake in Accounting?

Accounting Professionals are asked many other questions based on Job Clarification. Accounting professional based on the role or position of job applied they are asked questions covering topics on  Accounts Payable , Payroll, Accounts Receivable or Billing , Bank Account Reconciliation, Questing on Cost, Audit, Financial Analysis and Tax.

Below Mentioned or some of the sample interview questions for accounting professionals.

1. Do you prepare journal Entries?2. How is the posting done manually or computerized?3. What is the total dollar volume of your company Invoices?4. How many invoices do you match, batch or code per week and per month?5. What is your responsibility with the companies’ expense account?6. How do you handle Discrepancies?

Interview Questions on Payroll

1. How is payroll produced? Do they produce in house or outside service?2. How many people are working in the payroll department and where does your position fall in terms of hierarchy?3. How many employees did you produce Payroll?4. How do your company  pay  employees?  salary or Hourly?5. Did you deal with Union or nonunion Payroll?6. Do you have exposure to payroll Taxes?7. How does the payroll information get to the financial statements?

Interview Questions on Accounts Receivable/ Billing

1. How complex was the billing process?2. How many accounts do you work on per week/ month and what is the cash volume?3. How frequently did your company bill your clients?4. Explain collection Process of your company?5. Do you have experience working with lock Box?6. Do you revive Aging Reports?

Page 19: All Types of Interview Questions

Interview questions asked on Bank Account Reconciliation

1. How many accounts did you have to reconcile monthly?2. Were they single or multi currency?3. How many cheques per average reconciliation?4. What types of accounts were they?

Interview Questions on Staff Accountants

1. Are you responsible for the general ledger account reconciliation work?2. How much General ledger analysis do you do? Are there multiple ledgers?3. Do you do the bank reconciliation work?4. How much review of journal entries do you perform? According to your opinion What is the most effective way of identifying errors?5. What was the timing of the month end close? What is your role in the month end close?6. How much involvement did you have in the preparation of monthly financial statements?7. Do you supervise or train any of your company employees?8. Tell me about your budgeting experience – what is the total amount of the budget for which you have responsibility?9. What is your role with the outside auditors?10. Tell me about your tax experience.11. Tell me about some of the special projects to which you have been assigned.

Interview Questions on Audit

1. How long have you been involved in auditing?2. hich type: internal/ external/ EDP/ government/ public/ private/ financial/ operational SOX?3. Have you led a team in Audit?4. Explain to me a typical audit you would perform.5. What type of training did you receive?6. How long was the average audit that you performed?7. How much money have you saved a company with your findings?8. What types of operational improvements were implemented as a result of the audit recommendations?

Interview Questions on COST

1. What is your cost background? Do you handle standard, job or labour costing or all three?2. Which specific cost systems can you work with?3. What type of variance analysis do you perform?4. What inventory analysis do you perform?5. What is your responsibility as it relates to the financial statements?6. How does your department work with activity based costing?7. What percentage of the budget are you responsible in your company for and what is the volume?

Page 20: All Types of Interview Questions

Financial Analysis

1. Please explain the type of analysis you perform in your company?2. What is your role with the corporate budget? What is the total volume on that budget?3. What type of work do you do with the profit and loss and/or balance sheet?4. How much short or long term planning have you done?5. What supervisory role do you play, in your company? Explain if any?6. When your auditors come to your office how do you assist the auditors?7. Explain any Financial Modeling? Have you developed any type of financial Modeling?8. In what way did you utilize the accounting package and what type of ad hoc reporting did you perform?9. What types of special projects did you handle in your company?10. What is your role or interaction with executive management?

Interview Questions on Tax

1. Explain your Experience on Taxing for corporate, partnership, personal, expatriate, property, sales, payroll, estate, trust, etc2. What Tax software do you Know?3. Have you any exposure to bankruptcy Filing?4. What certifications do you have to practice in the tax field?5. Have you been involved in any type of management or tax training?

Interview Questions asked for Accounting Manager/ Controller

1. How large was the department that you were responsible for?2. What was the timing of your monthly close?3. How consistent and up to date were the monthly account reconciliations and back reconciliations?4. What accounting system did you utilize? What did you like about it?5.  Have you ever been involved in a computer conversion?6. Explain the duties that you handle on a day to day basis?7. What is your interface with the budget?8. What is your responsibility with risk management?9. How much money have you saved your company and how did you do this?

Interview Questions asked for VP Finance/ CFO

Candidates attending for VP Finance /CFO role should be able to answer many of the above mentioned questions as well as questions such as

1. What could your organization have done to improve operationally?2. How was the cash flow? Line of Credit? Factoring?

Preparing well for these above mentioned questions helps any accounting Professional to be Successful in interview. Also read many other Interview tips mentioned in Tips on Interview.

Page 21: All Types of Interview Questions

Desktop Publishing Interview Questions

Desktop Publisher is a person who checks preliminary and final proofs and makes necessary corrections. He also operates desktop publishing software and equipment to design, lay out, and produce camera-ready copy. It is a position where one can utilize his/her web and graphical design skills. It also involves high level technical writing. Every year a large number of people appear for the interview, for the post of Desktop Publisher, but only a few of them are able to crack the interview. If you are looking to go for the interview, then given below are some of the best Interview Questions and there suitable answers that can really help you out

1. What are your educational qualifications?

I have done B.A., Graphic Design, 1994, from the University of Richmond, Richmond, VA.

These are a few sample interview questions for the post of Desktop Publisher. Make sure you go through these questions, before going for the interview

2. Why do you think we should appoint you for this job?

I have excellent communication skills, both verbal and written. I also have a decent amount of knowledge of Windows Platforms, including IIS Web Server Administration. I am also very good in handling all types of work pressures. I have good supervisory skills as well. I firmly believe that I am the right person for this job.

3. What is your career objective?

I am looking for a position where I can make the most of my graphic and web design skills. I really look forward to projects that involve development of innovative and technically challenging print and multimedia.

4. What is you experience in the field of Desktop Publishing?

I have 8 years experience in Technical Writing, primarily in Software user manuals, and procedures (process documentation).

I am also very well acquainted with web design and development after gaining four years of experience in the latter. I also have ample amount of experience working with web-based publishing, software engineers and developers.

5. What tasks you had to perform in your previous job?

In my previous job, I was responsible for designing document styles to match the corporate standards. I also solved technical problems in a multi-user LAN Environment. I also wrote numerous user guides. I was also given the task of creating various lay-outs. I even designed and created various covers for occasional supplementary and bi-annual publications. Besides all this I completed various DTP prepress image processing jobs for the magazine.

Page 22: All Types of Interview Questions

Actionscript Interview Questions

Action Script is a scripting language based on ECMA Script. Actionscript Originally developed by Macromedia, the language is now owned by Adobe which acquired Macromedia in 2005. ActionScript started as a scripting language for Macromedia’s Flash authoring tool, now developed by Adobe Systems as Adobe Flash.

Early Flash developers could attach a simple command, called an “action”, to a button or a frame. The set of actions was basic navigation controls, with commands such as “play”, “stop”, “getURL”, and “gotoAndPlay”. Later versions added functionality allowing for the creation of Web-based games and rich Internet applications with streaming media such as video and audioAction Script is used primarily for the development of websites and software using the Adobe Flash Player platform in the form of SWF files embedded into Web pages, but is also used in some database applications such as Alpha Five, and in basic robotics, as with the Make Controller Kit.

Action Script was initially designed for controlling simple 2D vector animations made in Adobe Flash formerly Macromedia Flash. The first three versions of the Flash authoring tool provided limited interactivity features. With the release of Flash 4 in 1999, this simple set of actions became a small scripting language. New capabilities introduced for Flash 4 included variables, expressions, operators, if statements, and loops. Although referred to internally as “Action Script”, the Flash 4 user manual and marketing documents continued to use the term “actions” to describe this set of commands

Tips For Candidates Attending For Call Center

Are you attending for call center job? Read these tips by experts to be successful in call center job interview. According to industry data, only 7 out of every 100 call center applicants get hired or accepted by companies. The reason for low enrolment for call center jobs is due to lack of English proficiency and other related skills. Any company hiring for call center jobs looks for candidate having good communication skills, thorough understanding of products and services, quickly identify the problems, keep a pulse on what customers are saying,  good listening skills and who treats the customers with respect.

To get call center job you must market yourself.  One of your most important self-marketing tools is your resume.

Your resume showcases your experience and accomplishments for potential call center employers and your strategy should be to emphasize your job experience and skills that employers you’re interested in are looking for. Ask your friend or Colleague to check your resume before you attend for Interview. A good drafted resume separates you from the masses and attracts the attention of employers. Remember that your resume must demonstrate your communication and organizational skills. Before placing your resume in front of potential call

Page 23: All Types of Interview Questions

center employers be certain that you’ve spent sufficient time preparing it for view, then go over it again. Check for proper grammar and correct spelling

Emphasize your areas of expertise in Help Desk, customer service, customer relation ship management (CRM), telesales or telemarketing. Candidate attending for call center jobs should be willing to work in shifts (24/ 7), including weekends and Holidays if the business needs that level of coverage.

Once selected for call center job companies provide you training and reference materials to ensure that you have an understanding of companies business, product or service.

Hacking

When computers or network resources are unauthorized used then we call it as Hacking. Hacking is an act of penetrating computer systems to gain knowledge about the system and how it works. Different HACKING programs can do different amounts of damages to our computer system this depends upon what backdoor programs are hiding in our personal computer. The most prominent definition of hacking is the act of gaining access without legal authorization to a computer or computer network .Earlier hacker is considered as a gifted programmer but now days it has many negative implications. When hacking is done by a request and under contract between an ethical hacker and an organization it is ok or accepted, here ethical hacker has authorization to probe the target.

The main reason for hacking is due to poor configuration or web servers, disabled security controls , poorly chosen or default passwords and  unpatched or old software’s, Number of gifted hackers in the world is very small, but there are many problems with hacking now a days. Technically hacker is someone who is enthusiastic about computer programming and many things relating to the technical workings of a computer. A hacker first attacks an easy target, and then uses it to hide his or her traces for launching attacks at more secure sites.

Hackers can see everything we are doing, and can access any file on our disk. Hackers can write New files, Delete files, Edit files, and do practically anything to a file that could be done to a file. A hacker could install several programs on to our system without our knowledge. Such programs could also be used to steal personal information such as email or system passwords and credit card information. West German hacker (Pengo) exploited the fact that many systems came with default usernames and passwords which some buyers neglected to change. He succeeded by persistence.

However, most people understand a hacker as a ‘cracker’, cracking software, tries billions of passwords to find the correct one for accessing a computer; Crackers are programmers who try to gain unauthorized access to computers. This is normally done through the use of a backdoor program installed on a computer machine; a lot of crackers also try to gain access to resources through the use of password. Another method of hacking is to email someone a program that either automatically runs, or that runs when they click on an attachment

Page 24: All Types of Interview Questions

How do Hackers hack?

There are many ways in which a hacker can hack. Some are as follows

* HTTP

* FTP (File Transfer Protocol)

* ICMP Ping

* NetBIOS

* Rpc.statd

Data Warehousing Interview Questions

1) Explain some disadvantages of data ware house?

These are some of the disadvantages of data ware house: -

1) It represents a very large project with a very broad scope which is a big disadvantage.2) Upfront costs are very huge and the duration of the project from the start to the end user is significant.3) It is inflexible and unresponsive to the departmental needs.

2) Explain about the top design?

In a top design model data ware house is designed in a normalized enterprise model. This is chiefly used for business intelligence and management capabilities. Data used for business purpose and management can be met through a data ware house. It is used to generate dimensional views and is known to be good and stable against business changes.

3) Explain about the non-volatile feature of data ware house?

Data once written and saved in data ware house is static and it can never be deleted and over written once confirmed. It will be static and read-only. This can be used for future reporting and it allows good security feature.

4) What are the different interconnected layers of a data ware house?

There are four different interconnected layers they are: -• Operational database layer• Informational access layer

Page 25: All Types of Interview Questions

• Data access layer• Meta data layer.

5) What do you know about Data warehousing?

Data warehousing is used for reporting and analysis of the data. It is primarily used to analyze data. Some of the additional uses of it are extraction and retrieval of data, manage, load and manipulate data. It has various tools which can transform, load, extract and manage the data.

6) Explain about the time variant feature of Data ware housing?

Data ware house detects and tracks all the changes according to time. This allows a database developer to detect the changes across time which helps him to keep a log.

7) Explain about the top design?

In a top design model data ware house is designed in a normalized enterprise model. This is chiefly used for business intelligence and management capabilities. Data used for business purpose and management can be met through a data ware house. It is used to generate dimensional views and is known to be good and stable against business changes.

Explain about hybrid design model?

Due to the various risks and disadvantages presented by top down and bottom down models it has become imperative that Hybrid methodologies be used. This is used for fast turn around time and enterprise wide data consistency. This uses features and benefits from top down and bottom down models.

9) State some of the disadvantages of data ware houses?

Some of the disadvantages are as follows: -

1) Data ware house can be costly due to high maintenance of the database. It is usually not static.2) There is always a risk of it delivering outdated results which makes it less productive.3) A fine line exists between data ware house and operational systems.

10) Explain about the bottom up design?

Bottom up design provides the advantage of a quick turnaround. As soon as the first data marts are created business values can be returned. Some of the disadvantages caused are due to multiple versions and false truth operations. Conforming dimensions and tight management can mitigate these risks.

11) State some of the benefits of data ware housing?

These are some of the benefits of data ware housing they are: -

Page 26: All Types of Interview Questions

1) Regardless of the data source it provides common data model this feature makes analysis of data much easier.2) Inconsistency is identified during the loading process.3) In case there is a crash of the database, database programmer can feel comfortable because it is stored in the data ware housing.4) It is very efficient and will not slow down the operational system.

12) What do you think about the future of data ware housing?

Data ware housing will be used by organizations to analyze their huge pool of data.With the development of various data ware house appliances performance of data ware housing applications can be improved. There would be many more apps working in accordance with the Gartner Group report which makes it much user friendly and reliable.

13) State two major differences between a data ware house and operational data ware house?

There exist two major differences they are: -1) It integrates information from a pre existing source database2) It is used for analysis usually for OLAP where huge amounts of data occur frequently.5) Explain about the integrated data ware house stage?At this stage data ware house gets updated every time a transaction occurs. The transactions performed during this time are passed back to the operational systems which records the transactions.6)These are some of the questions make sure that you learn many more questions.

Mainframes Interview Questions

1. What should be the sorting order for SEARCH ALL?

It can be either ASCENDING or DESCENDING. ASCENDING is default. If you want the search to be done on an array sorted in descending order, then while defining the array, you should give DESCENDING KEY clause. (You must load the table in the specified order).

2. What does the IS NUMERIC clause establish ?

IS NUMERIC can be used on alphanumeric items, signed numeric & packed decimal items and usigned numeric & packed decimal items. IS NUMERIC returns TRUE if the item only consists of 0-9. However, if the item being tested is a signed item, then it may contain 0-9, + and – .

3. What is the difference between index and subscript?

Page 27: All Types of Interview Questions

Subscript refers to the array occurrence while index is the displacement (in no of bytes) from the beginning of the array. An index can only be modified using PERFORM, SEARCH & SET.

4. What is binary search?

Search on a sorted array. Compare the item to be searched with the item at the center. If it matches, fine else repeat the process with the left half or the right half depending on where the item lies.

5. How do you sort in a COBOL program? Give sort file definition, sort statement syntax and meaning?

Syntax:

SORT file-1 ON ASCENDING/DESCENDING KEY key….

USING file-2

GIVING file-3.

USING can be substituted by INPUT PROCEDURE IS para-1 THRU para-2

GIVING can be substituted by OUTPUT PROCEDURE IS para-1 THRU para-2.

file-1 is the sort workfile and must be described using SD entry in FILE SECTION.

file-2 is the input file for the SORT and must be described using an FD entry in FILE SECTION and SELECT clause in FILE CONTROL.

file-3 is the outfile from the SORT and must be described using an FD entry in FILE SECTION and SELECT clause in FILE CONTROL.

file-1, file-2 & file-3 should not be opened explicitly.

INPUT PROCEDURE is executed before the sort and records must be RELEASEd to the sort work file from the input procedure.

OUTPUT PROCEDURE is executed after all records have been sorted. Records from the sort work file must be RETURNed one at a time to the output procedure.

6. What is the use of EVALUATE statement?

Evaluate is like a case statement and can be used to replace nested Ifs. The difference between EVALUATE and case is that no ‘break’ is required for EVALUATE i.e. control comes out of the EVALUATE as soon as one match is made.

Page 28: All Types of Interview Questions

7. When would you use in-line perform?

When the body of the perform will not be used in other paragraphs. If the body of the perform is a generic type of code (used from various other places in the program), it would be better to put the code in a separate para and use PERFORM paraname rather than in-line perform.

8. Can I redefine an X(100) field with a field of X(200)?

Yes. Redefines just causes both fields to start at the same location. For example:

01 WS-TOP PIC X(1)

01 WS-TOP-RED REDEFINES WS-TOP PIC X(2).

If you MOVE ’12′ to WS-TOP-RED,

DISPLAY WS-TOP will show 1 while

DISPLAY WS-TOP-RED will show 12.

9. What do you do to resolve SOC-7 error?

Basically you need to correct the offending data.

Many times the reason for SOC7 is an un-initialized numeric item. Examine that possibility first.

Many installations provide you a dump for run time abends ( it can be generated also by calling some subroutines or OS services thru assembly language). These dumps provide the offset of the last instruction at which the abend occurred. Examine the compilation output XREF listing to get the verb and the line number of the source code at this offset. Then you can look at the source code to find the bug. To get capture the runtime dumps, you will have to define some datasets (SYSABOUT etc ) in the JCL.

If none of these are helpful, use judgement and DISPLAY to localize the source of error. Some installtion might have batch program debugging tools. Use them.

10.How is sign stored in Packed Decimal fields and Zoned Decimal fields?

Packed Decimal fields: Sign is stored as a hex value in the last nibble (4 bits ) of the storage. Zoned Decimal fields: As a default, sign is over punched with the numeric value stored in the last bite.

Page 29: All Types of Interview Questions

MIS – Management Information SYSTEM

MIS is a planned system of collecting Data, processing, storing and disseminating data in the form of information needed to carry out the functions of management. MIS (Management Information System)  isBasically concerned with processing data into information, which is then communicated to the various departments in an organization for appropriate decision-making.  Phillip kotler defined MIS “A marketing information system consists of people equipment and procedures to gather, sort, analyze, evaluate, and distribute needed, timely, and accurate information to marketing decision makers.

Management is usually defined as planning, organizing, directing, and controlling the business operation.Management Information System or MIS can also be defined as an information system that integrates data from all the departments it serves and provides operations and management with the information they require. Management information systems consist of computer resources, people, and procedures used in the modern business enterprise.

MIS (Management information system) is distinct from regular information systems, the term MIS is commonly used to refer to the group of information management methods tied to support or automation of human decision making.  Initially in businesses and other organizations, internal reporting was made manually and only periodically, due to this the decision making was delayed and resulted for poor management performances. So now a days with introduction of computers helped to maintain and track all the accounts and data with no wastage of time, As new applications were developed that provided managers with information about sales, inventories, finance , costing a product,  and other data that would help in managing the enterprise MIS Term is used broadly in a number of contexts.

Data   >   Information >   Communication    >    Decisions

Management information systems do not have to be computerized, but with today’s large, multinational corporations, computerization is a must for a business to be successful. MIS (Management information system)  provides several benefits to any Organization; it helps in providing quick access to relevant data and documents efficient co-ordination between various departments in an organization, use of less labour, management of day to day activities effectively and efficiently and Closer contact with the rest of the world .With the introduction of the Internet and the World Wide Web, students are able to access information faster and more efficiently using modern Computer Systems. Presently any organization or individual can quickly access, save and print information from any location. One can access internet from Cyber Cafes, schools, mobile phones, at home and even at modern libraries through internet service providers and telecommunication links which helps to make decisions faster.

MIS (Management information system) can be classified as performing three main functions:

1. MIS helps to generate reports like financial statements, inventory status reports, or performance reports needed for routine or nonroutine purposes.

Page 30: All Types of Interview Questions

2. MIS Helps to answer what-if questions asked by management. For example, questions such as “If company changes credit term for customers what would happen to cash flow?  Can be answered by MIS.

3. MIS helps to support decision making, this type of MIS is appropriately called Decision Support System (DSS). DSS attempts to integrate the decision maker, the data base, and the quantitative models being used.

MIS (Management Information System) usually relies on a well-developed data management system, including a data base for helping management reach accurate and rapid organizational decisions. MIS personnel must be technically qualified to work with computer hardware, software, and computer information systems.  So MIS used in right proper way will help in running successful business.

Multimedia Career Interview Questions

Multimedia Represents convergence of text, video, Pictures and sound into a single form. Multimedia is usually recorded and played, displayed and accessed by information content processing devices. Such as computerized and electronic devices, but can also be part of a live performance. Multimedia includes a combination of text, still images, Audio, Animation, video, and interactivity content forms. Hypermedia can be considered one particular multimedia application. Multimedia finds its application in various fields including, but not limited to, Advertisements, Art, Education, Entertainment, Engineering, Medicine, Mathematics, Business and scientific research.

Multimedia may be broadly divided into linear and non-linear categories.Linear active content progresses without any navigation control for the viewer such as a cinema presentation. Non-linear content offers user interactivity to control progress as used with a computer game or used in self-paced computer based training. Hypermedia is an example of non-linear content. Multimedia presentations can be live or recorded. Multimedia presentations may be viewed in person on stage, projected, transmitted, or played locally with a media player. A recorded Multimedia presentation may allow interactivity via a navigation system. A live multimedia presentation may allow interactivity via an interaction with the presenter or performer. Broadcasts and recordings can be either analog or digital electronic media technology. Digital online multimedia may be downloaded or streamed. Streaming multimedia may be live or on-demand.

Multimedia games and simulations may be used in a physical environment with special effects, with multiple users in an online network, or locally with an offline computer, game system, or simulator. Online multimedia is increasingly becoming object-oriented and data-driven, enabling applications with collaborative end-user innovation and personalization on multiple forms of content over time.

Page 31: All Types of Interview Questions

Multimedia and the Internet require a completely new approach to writing. The style of writing that is appropriate for the ‘on-line world’ is highly optimized and designed to be able to be quickly scanned by readers. A good web site must be made with a specific purpose in mind and a web site with good interactivity and new technology can also be useful for attracting visitors. The web site must be attractive and innovative in its design, function in terms of its purpose, easy to navigate, frequently updated and fast to download. When users view a page, they can only view one web page at a time. As a result, multimedia users must create a mental model of information structure.

Until Mid-90 due to expensive hardware multimedia usage is limited. With increases in Hard Ware performance and decreases in price, multimedia is widely used now a days. Almost all PC’s now a days are capable of displaying video, though the resolution available depends on the power of the computer’s video adapter and CPU. Multimedia can arguably be distinguished from traditional motion pictures or movies both by the scale of the production. Multimedia is usually smaller and less expensive and by the possibility of audience interactivity or involvement (in which case, it is usually called interactive multimedia.

Multimedia presentations are possible in many contexts, including the Web, CD-ROMs, and live theater. Since any Web site can be viewed as a multimedia presentation, however, any tool that helps develop a site in multimedia form can be classed as multimedia software and the cost can be less than for standard video productions. For multimedia Web sites, popular multimedia sound or sound and motion video or animation players include QuickTime, MPEG, and Shockwave.

.NET Interview Questions

1 What is .NET Framework?

Ans: The .NET Framework has two main components: the common language runtime and the .NET Framework class library. You can think of the runtime as an agent that manages code at execution time,providing core services such as memory management, thread management, andremoting, while also enforcing strict type safety and other forms of code accuracy that ensure security and robustness.The  class library, is a comprehensive, object-oriented collection of reusable types that you can use to develop applications ranging from traditional command-line orgraphical user interface (GUI) applications to applications based on the latestinnovations provided by ASP.NET, such as Web Forms and XML Web services.

2 What are Name spaces?

Ans: The namespace keyword is used to declare a scope. This name space scope lets you organize code and gives you a way to create globally-unique types. Even if you do not explicitly declare one, a default namespace is created. This unnamed name space,sometimes called the global namespace, is present in every file. Any identifier in theglobal namespace is available for use in a named namespace. Namespaces implicitly have public access and this is not modifiable.

Page 32: All Types of Interview Questions

3 What is CLR?

Ans: The CLS is simply a specification that defines the rules to support language integrationin such a way that programs written in any language, yet can interoperate with one another, taking full advantage of inheritance, polymorphism, exceptions, and other features. These rules and the specification are documented in the ECMA proposed standard document, “Partition I Architecture”.

4 Is .NET a runtime service or a development platform?

Ans: It’s both and actually a lot more. Microsoft .NET includes a new way of delivering software and services to businesses and consumers. A part of Microsoft.NET is the .NET Frameworks. The .NET frameworks SDK consists of two parts: the .NET common language runtime and the .NET class library. In addition, the SDK also includes command-line compilers for C#, C++, JScript, and VB. You use these compilers to build applications and components. These components require the runtime to execute so this is a development platform.

5 What is MSIL, IL?

Ans: When compiling to managed code, the compiler translates your source code intoMicrosoft intermediate language (MSIL),which is a CPU-independent set of instructions that can be efficiently converted to native code. MSIL includes instructions for loading, storing, initializing, and calling methods on objects, as well as instructions for arithmetic and logical operations, control flow, direct memory access, exception handling, and other operations. Microsoft intermediate language (MSIL) is a language used as the output of a number of compilers and as the input to a just-in-time (JIT) compiler. The common language runtime includes a JIT compiler for converting MSIL to native code.

6 Can I write IL programs directly?

Ans: Assembly MyAssembly {}.class MyApp {.method static void Main() {.entrypointldstr “Hello, IL!”call void System.Console::WriteLine(class System.Object)ret}}.

7 What is CTS?

Ans: The common type system defines how types are declared, used, and managed in theruntime, and is also an important part of the runtime’s support for cross-language integration.The common type system supports two general categories of types,eachofwhich isfurther divided into subcategories:

Page 33: All Types of Interview Questions

• Value typesValue types directly contain their data, and instances of value types are either allocated on the stack or allocated inline in a structure. Value types can be built-in (implemented by the runtime), user-defined, or enumerations.• Reference typesReference types store a reference to the value’s memory address, and are allocated on the heap. Reference types can be self-describing types, pointer types, or interface types. The type of a reference type can be determined from values of self-describing types. Self-describing types are further split into arrays and class types. The class types are user-defined classes, boxed value types, and delegates.

8 What is JIT (just in time)? how it works?

Ans: Before Microsoft intermediate language (MSIL) can be executed, it must beconverted by a .NET Framework just-in-time (JIT) compiler to native code, which is CPU-specific code that runs on the same computer architecture as the JIT compiler.

Rather than using time and memory to convert all the MSIL in a portable executable  (PE) file to native code, it converts the MSIL as it is needed during execution and  stores the resulting native code so that it is accessible for subsequent calls.The  runtime supplies another mode of compilation called install-time code generation.The install-time code generation mode converts MSIL to native code just as the regular  JIT compiler does, but it converts larger units of code at a time, storing the resulting  native code for use when the assembly is subsequently loaded and executed.

As part of compiling MSIL to native code, code must pass a verification process unless an administrator has established a security policy that allows code to bypass  verification. Verification examines MSIL and metadata to find out whether the code can  be determined to be type safe, which means that it is known to access only the memory locations it is authorized to access.

9  What is strong name?

Ans: A name that consists of an assembly’s identity—its simple text name, version number,and culture information (if provided)—strengthened by a public key and a digital signature generated over the assembly.

10 What is portable executable (PE)?

Ans: The file format defining the structure that all executable files (EXE) and  Dynamic LinkLibraries (DLL) must use to allow them to be loaded and executed by Windows. PE isderived from the Microsoft Common Object File Format (COFF). The EXE  and DLL filescreated using the .NET Framework obey the PE/COFF formats and also add additionalheader and data sections to the files that are only used by the CLR. The specificationfor the PE/COFF file formats is available.

Page 34: All Types of Interview Questions

11How is .NET able to support multiple languages?

Ans:language should comply   with the Common Language Runtime standard to become a.NET language. In .NET, code is compiled to Microsoft Intermediate Language  (MSIL for short). This is called as Managed Code. This Managed code is run in .NET  environment. So after compilation to this IL the language is not a barrier. A code can  call or use a function written in another language.

12 Which name space is the base class for .net Class library?

Ans: system.object.

13 What is Event -Delegate? clear syntax for writing a event delegate?Ans: The event keyword lets you specify a delegate that will be called upon the occurrence of some “event” in your code. The delegate can have one or more associated methods that will be called when your code indicates that the event has  occurred. An event in one program can be made available to other programs that  target the .NET Framework.

14 What are object pooling and connection pooling and difference? Where do 0we set the Min and Max Pool size for connection pooling?

Ans: Object pooling is a COM+ service that enables you to reduce the overhead of creating each object from scratch. When an object is activated, it is pulled from the  pool. When the object is deactivated, it is placed back into the pool to await the next  request. You can configure object pooling by applying the Object Pooling attribute to a  class that derives from the System.EnterpriseServices.ServicedComponent class.

Object pooling lets you control the number of connections you use, as opposed to connection pooling, where you control the maximum number reached. Following are important differences between object pooling and connection pooling:• Creation. When using connection pooling, creation is on the same thread, so if there  is nothing in the pool, a connection is created on your be half. With object pooling, the   pool might decide to create a new object. However, if youhave already reached your  maximum, it instead gives you the next available object. This is crucial behavior when it  takes a long time to create an object.

15 How many languages .NET is supporting now?

Ans: When .NET was introduced it came with several languages. VB.NET, C#,  COBOL and Perl, etc. The site DotNetLanguages.Net says 44 languages are supported.

16 How ASP .NET different from ASP?

Ans: Scripting is separated from the HTML, Code is compiled as a DLL, these DLLs  can be executed on the server.

17 What is smart navigation?

Page 35: All Types of Interview Questions

Ans: The cursor position is maintained when the page gets refreshed due to the  server side validation and the page gets refreshed.

18 What is view state?

Ans: The web is stateless. But in ASP.NET, the state of a page is maintained in  the in the page itself automatically. How? The values are encrypted and saved in  hidden controls. this is done automatically by the ASP.NET. This can be switched off /  on for a single control.

19 How do you validate the controls in an ASP .NET page?

Ans: Using special validation controls that are meant for this. We have Range Validator, Email Validator.

20 Can the validation be done in the server side? Or this can be done only in the Client side?

Ans: Client side is done by default. Server side validation is also possible. We can switch off the client side and server side can be done.

Oracle Apps Interview Questions

1. How will you open a bc4j package in jdeveloper?

Oracle ships a file named server.xml with each bc4j package. You will need to ftp that file alongside other bc4j objects (VO’s, EO’s, AM, Classes etc).Opening the server.xml will load the complete package starting from AM (application module). This is a mandatory step when building Extensions to framework.

2. In OA Framework Self-Service screen, you wish to disable a tab. How will you do it?

Generally speaking, the tabs on a OA Framework page are nothing but the Submenus. By entering menu exclusion against the responsibility, you can remove the tab from self service page.

3.Can you extend and substitue a root AM ( Application Module) in OA Framework using J Developer?

You can extend the AM in j Developer, but it doesn’t work( at least it didn’t work in 11.5.9). I am hopeful that Oracle will deliver a solution to this in the future.

Page 36: All Types of Interview Questions

4.How will you add a new column to a List Of Values ( LOV ) in Oracle Applications Framework? Can this be done without customization?

Yes, this can be done without customization, i.e. by using OA Framework Extension coupled with Personalization. Implement the following Steps :-

a) Extend the VO ( View Object ), to implement the new SQL required to support the LOV.b) Substitute the base VO, by using jpximport [ similar to as explained in Link ]c) Personalize the LOV Region, by clicking on Add New Item. While adding the new Item, you will cross reference the newly added column to VO.

5.You have written a piece of code in POR_CUSTOM_PKG for Oracle Procurement, but its not taking any effect? What may be the reason?

Depending upon which procedure in POR_CUSTOM_PKG has been programmed, one or more of the below profile options must be set to Yes.POR: Enable Req Header CustomizationPOR: Enable Requisition Line CustomizationPOR: Enable Req Distribution Customization

6.In OA Framework, once your application has been extended by substitutions, is it possible to revert back to remove those substitutions?

Yes, by setting profile option “Disable Self-Service Personal%” to yes, keeping in mind that all your personalizations will get disabled by this profile option. This profile is also very useful when debugging your OA Framework based application in the event of some error. By disabling the personalization via profile, you can isolate the error, i.e. is being caused by your extension/substitution code or by Oracle’s standard functionality.

7.How do you setup a context sensitive flexfield?

Note: I will publish a white paper to sho step by step approach. But for the purpose of your interview, a brief explanation is…a)Create a reference field, b) Use that reference field in “Context Field” section of DFF Segment screen c) For each possible value of the context field, you will need to create one record in section “Context Field Value” ( beneath the global data elements).

8.Give me one example of securing attributes in i Procurement?

You can define Realm to bundle suppliers into a Category. Such realm can then be assigned to the User using Define User Screen. Security Attribute ICX_POR_REALM_ID can be used. By doing so, the user will only be made visible those Punchout suppliers that belong to the realm against their securing attributes.

9.How does substitution work in OA Framework? What are the benefits of using Substitution in OA Framework?

Page 37: All Types of Interview Questions

Based on the user that has logged into OA Framework, MDS defines the context of the logged in user. Based upon this logged in context, all applicable personalization are applied by MDS. Given that substitutions are loaded as site level personalizations, MDS applies the substituted BC4J objects along with the Personalizations. The above listed steps occur as soon as Root Application module has been loaded.

The benefit of using Substitution is to extend the OA Framework without customization of the underlying code. This is of great help during Upgrades. Entity Objects and Validation Objects can be substituted. I think Root AM’s can’t be substituted given that substitution kicks off after Root AM gets loaded.

10.Does oracle support partitioning of tables in Oracle Apps?

Yes, Oracle does support partitioning of tables in Oracle Applications. There are several implementations that partition on GL_BALANCES. However your client must buy licenses to if they desire to partition tables. To avoid the cost of licensing you may suggest the clients may decide to permanently close their older GL Periods, such that historical records can be archived.

11.This is a very tough one, almost impossible to answer, but yet I will ask. Which Form in Oracle Applications has most number of Form Functions?

“Run Reports”. And why not, the Form Function for this screen has a parameter to which we pass name of the “Request Group”, hence securing the list of Concurrent Programs that are visible in “Run Request” Form. Just so that you know, there are over 600 form functions for “Run Reports”

12.Can you list any one single limitation of Forms Personalization feature that was delivered with 11.5.10?

You can not implement interactive messages, i.e. a message will give multiple options for Response. The best you can get from Forms Personalization to do is popup up Message with OK option.

13.Does Oracle 10g support rule based optimization?

The official stance is that RBO is no longer supported by 10g.

OOPS Interview Questions

1. Explain what is an object?

Page 38: All Types of Interview Questions

An object is a combination of messages and data. Objects can receive and send messages and use messages to interact with each other. The messages contain information that is to be passed to the recipient object.

2. Explain about the Design Phase?

In the design phase, the developers of the system document their understanding of the system. Design generates the blue print of the system that is to be implemented. The first step in creating an object oriented design is the identification of classes and their relationships.

3. Explain about parametric polymorphism?

Parametric polymorphism is supported by many object oriented languages and they are very important for object oriented techniques. In parametric polymorphism code is written without any specification for the type of data present. Hence it can be used any number of times.

4. Explain about multiple inheritance?

Inheritance involves inheriting characteristics from its parents also they can have their own characteristics. In multiple inheritances a class can have characteristics from multiple parents or classes. A sub class can have characteristics from multiple parents and still can have its own characteristics.

5. Explain the mechanism of composition?

Composition helps to simplify a complex problem into an easier problem. It makes different classes and objects to interact with each other thus making the problem to be solved automatically. It interacts with the problem by making different classes and objects to send a message to each other.

6. Explain about overriding polymorphism?

Overriding polymorphism is known to occur when a data type can perform different functions. For example an addition operator can perform different functions such as addition, float addition etc. Overriding polymorphism is generally used in complex projects where the use of a parameter is more.

7. Explain about inheritance?

Inheritance revolves around the concept of inheriting knowledge and class attributes from the parent class. In general sense a sub class tries to acquire characteristics from a parent class and they can also have their own characteristics. Inheritance forms an important concept in object oriented programming.

8. Explain the rationale behind Object Oriented concepts?

Page 39: All Types of Interview Questions

Object oriented concepts form the base of all modern programming languages. Understanding the basic concepts of object-orientation helps a developer to use various modern day programming languages, more effectively.

9.Explain about instance in object oriented programming?

Every class and an object have an instance. Instance of a particular object is created at runtime. Values defined for a particular object define its State. Instance of an object explains the relation ship between different elements.

10) Explain about encapsulation?

Encapsulation passes the message without revealing the exact functional details of the class. It allows only the relevant information to the user without revealing the functional mechanism through which a particular class had functioned.

11) Explain about polymorphism?

Polymorphism helps a sub class to behave like a parent class. When an object belonging to different data types respond to methods which have a same name, the only condition being that those methods should perform different function.

12) Explain about object oriented databases?

Object oriented databases are very popular such as relational database management systems. Object oriented databases systems use specific structure through which they extract data and they combine the data for a specific output. These DBMS use object oriented languages to make the process easier.

13) What are all the languages which support OOP?

There are several programming languages which are implementing OOP because of its close proximity to solve real life problems. Languages such as Python, Ruby, Ruby on rails, Perl, PHP, Cold fusion, etc use OOP. Still many languages prefer to use DOM based languages due to the ease in coding.

14) Explain the implementation phase with respect to OOP?

The design phase is followed by OOP, which is the implementation phase. OOP provides specifications for writing programs in a programming language. During the implementation phase, programming is done as per the requirements gathered during the analysis and design phases.

15) Explain about Object oriented programming?

Page 40: All Types of Interview Questions

Object oriented programming is one of the most popular methodologies in software development. It offers a powerful model for creating computer programs. It speeds the program development process, improves maintenance and enhances reusability of programs.

16) Explain about a class?

Class describes the nature of a particular thing. Structure and modularity is provided by a Class in object oriented programming environment. Characteristics of the class should be understandable by an ordinary non programmer and it should also convey the meaning of the problem statement to him. Class acts like a blue print.

People Soft Interview Questions

1. Is Web Sphere certified on People Tools 8.1 xs?

No. IBM Web Sphere is certified on People Tools 8.4 only. Customer wishing to use IBM Web Sphere with People Tools 8.1 xs may take advantage of an IBM Web Sphere for early adopters program, created and managed by IBM. Further information about this program can be found in the whitepaper The IBM Web Sphere 8.1x Early Adopter Program. Are there additional license requirements for IBM Web Sphere.

2. Are disconnected mobile applications supported in People Tools 8.1x?

No. The PeopleSoft Mobile Agent architecture, which is used to support disconnected mobile applications, is only available in People Tools 8.4. The PeopleSoft Mobile Agent is dependent upon certain core technologies that were specifically developed for People Tools 8.4.

3. Why did PeopleSoft bundle IBM Web Sphere Advanced Single Server Edition rather than Advanced Edition?

The Advanced Single Server Edition (AEs) of Web Sphere provides the same core J2EE and Web Services programming model as the Advanced Edition (AE) with simplified administration. In the AE version Web Sphere uses DB2 or other standard database to keep the configuration and runtime information to support very large farm of Web Sphere servers. However, it is one more database to install, administer and maintain. The AEs version does not use the database and uses file based configuration in a way that is similar to BEA Web Logic. PeopleSoft and IBM Web Sphere architects determined that AEs version would satisfy the deployment requirements of PeopleSoft customers and would make it easy for owning and administering PeopleSoft Applications based on Web Sphere.

4. Is BEA Web Logic the same thing as the web server that was previously on the Tuxedo CD?

Page 41: All Types of Interview Questions

No. The web server that was delivered on the Tuxedo CD has absolutely nothing to do with Web Logic. Web Logic is a web application server that is designed for large-scale production websites. The HTTP server on the Tuxedo CD was only there to provide a mechanism for launching the graphical Tuxedo administration console if the Tuxedo administrator didn’t already have a web server in place. It was never intended for large-scale, production website use only for a system administrator or two.

5. Is web server load balancing supported with People Tools 8.4?

Customers can set up clusters of BEA Web Logic or IBM Web Sphere servers to do web server load balancing. In such scenarios, if an instance is down, requests are automatically routed to another instance. For more information on high availability and clustering with Web Logic, Web Sphere and other web servers.

6. Will the PeopleSoft Internet Architecture, now that it embeds BEA Web Logic and IBM Web Sphere, work with my other corporate web servers and tools?

One of the core values of the People Tools development group is investment protection. The time, money and resources that you may have already invested in licensing another web server, training developers and administrators, building and deploying other web applications will not be compromised by this decision. How is this accomplished?

7. IBM how should Web Application Servers be used with People Tools 8.1x and People Tools 8.4?

The PeopleSoft Internet Architecture uses a web application server and an HTTP server. People Tools 8.12 and above include both BEA Web Logic and Apache with Jserv. With People Tools 8.4, both BEA Web Logic and IBM Web Sphere are bundled. Apache with Jserv is no longer a supported web application server combination. Customers can choose which web application server to run during installation time. In a mixed People Tools 8.1 xs and 8.4 environments, each People Tools installation should have their own chain of web application server and application server, PeopleSoft Proprietary and Confidential Page 5and these can be on the same machine. For example, a People Tools 8.1xinstallation using Apache and Jserv could reside on the same machine as a People Tools 8.4 installation using IBM Web Sphere. Care should be taken to ensure that unique port numbers are assigned to each server chain.

8. How does the PeopleSoft Enterprise Portal work with 8.1x and 8.4 applications?

There are several scenarios that may exist when customers use the PeopleSoft Enterprise Portal with a mixture of 8.1x and 8.4 applications. Specific information on the use of the PeopleSoft Enterprise Portal in a blended environment will be available in a forthcoming white paper, which will be available on Customer Connection. In general, the recommendation is to use the PeopleSoft Enterprise Portal 8.4with 8.1x and 8.4 applications, rather than an older version.

9. For the server layer on the web server, what version of the Java Servlet API are the PIA Java Serves coded to with People Tools 8.4?

Page 42: All Types of Interview Questions

The PIA Java servlets in People Tools 8.4 are coded to JavaSoft’s Java Servlet API 2.0 and are fully compatible with Servlet API 2.2. It should be noted that the PeopleSoft Internet Architecture is supported only on the BEA Web Logic and Web Sphere servlet engines.

10. Are there advantages or disadvantages to using BEA Web Logic over IBM Web Sphere or vice versa?

No. Both products are certified with PIA as of version 8.4 and work equally well. By offering both BEA Web Logic and IBM Web Sphere, we give our customers more choices and flexibility to run PeopleSoft in their preferred environment.

11. Does Application Messaging work between 8.1xand 8.4 applications?

Application Messaging is used by PeopleSoft applications to communicate with one another. This is true not just for 8.1x and 8.4 applications, but also between an 8.1x and an 8.4 application. For example, the HRMS 8.3 applications, which are based on People Tools 8.15, can communicate with Financials 8.4applications, which are based on People Tools 8.4, using Application Messaging. If specific issues materialize relating to the Application Messages published by certain applications, these new messages will be made available to customers.

12. Both BEA Web Logic and IBM Web Sphere have the ability to plug into many different web servers. Does PeopleSoft support the web servers that they plug into?

BEA and IBM provide plug-ins for many of the leading web servers. This allows the customer to use their own HTTP web server and Web Logic or Web Sphere Java servlet engine. PeopleSoft uses this plug-in capability to support IIS. We have no reason to believe that there will be any issues with other web servers that Web Logic or Web Sphere are able to work with through their plug-in architecture, but PeopleSoft GSC will not support these other web servers with People Tools 8.4

PHP Faqs

PHP (hyper text Preprocessor) is a computer scripting language. Designed for producing dynamic web pages, with syntax from C, Java and Perl, PHP code is embedded within HTML pages for server side execution it has evolved to include a command line interface capability and can be used in standalone graphical applications. PHP was originally created by Rasmus Lerdorf in 1995; the main implementation of PHP is now produced by The PHP Group and serves as the de facto standard for PHP as there is no formal specification. Released under the PHP License, the Free Software Foundation considers it to be free software. PHP is a widely used general-purpose scripting language that is especially suited for web development, taking PHP code as its input and creating web pages as output.

Page 43: All Types of Interview Questions

It can be deployed on most web servers and on almost every operating system and platform free of charge. From this you can create more complex loops and functions to make your page generate more specialized data. PHP is installed on more than 25 million websites and 1 million web servers.

1. What is a PHP File?

Ans: PHP files may contain text, HTML tags and scripts.PHP files are returned to the browser as plain HTML.PHP files have a file extension of “.php”, “.php3″, or “.phtml”.

2.How to install PHP on Apache?

Ans:You need to add the following lines to httpd.conf (If you’re using Apache for Win32).ScriptAlias /php/” c:/path-to-php-dir/”AddType application/x-httpd-php .phpAction application/x-httpd-php “/php/php.exe”Then restart Apache and it should interpret php files correctly.

3. Why PHP?

Ans: PHP runs on different platforms (Windows, Linux, Unix, etc.).PHP is compatible with almost all servers used today (Apache, IIS, etc.).PHP is FREE to download from the official PHP resource: www.php.net.PHP is easy to learn and runs efficiently on the server side.

4. How does PHP compare to ASP?

Ans: Microsoft’s Active Server Pages (ASP) comes with VBScript and JScript scripting languages, but you can also install scripting engines for Perl, REXX, and Python, whereas PHP will only ever be PHP. The most commonly used flavour of ASP is that written in VBScript. VBScript is a subset of Visual Basic, a standalone compiled language. This very fact makes ASP marketable to VB programmers wishing to build applications for the Internet. However, as a script language VBScript could never compete with its big brother, Visual Basic, only supplement it. In making this point, VBScript is not solely a glue to hold Visual Basic together with an Internet front-end, but that’s really what it does best.

ASP can prove to be very memory hungry beasts and regular calls on system objects, such as Active Data Objects (ADO) for working with databases can make for slow applications on heavily loaded machines. VBScript lacks many important features, which can be added through Component Object Model (COM) objects. An example of this, is when trying to send e-mail using VBScript, although the objects are available, they can be costly and more time consuming than the PHP equivalent (mail function). PHP can also be ‘added to’ with additional functionality being quite platform dependant. COM functions are supported by the Windows version of PHP and many libraries are available for *nix versions.

Page 44: All Types of Interview Questions

VBScript interpreters are available for various Unix based systems and Windows. However, finding a COM object that will send e-mail on a Unix system is nearly impossible and very expensive. This leads to the conclusion that ASP is only really at home in a Microsoft environment. It has its fair share of security flaws, but when used by professional VB programmers, I have seen ASP provide some immensely powerful interfaces. PHP on the other hand can be seen to provide the best results in the form of stability and speed on Unix based systems.

PHP is Open Source software, which is great as it means that code, manual, updates and support are all free. Although the ASP script engine comes included with IIS and PWS and minimal support is available free, running Microsoft operating systems at a commercial level is always going to be costly.

A lack of high profile sites using PHP makes it a bit harder to prove it’s robustness and gain acceptance from non-programming colleagues (e.g. management), but for a programmer the portability and stability of PHP is beneficial.

5 What is caching?

Ans: “Meta tags are easy to use, but aren’t very effective. That’s because they’re usually only honored by browser caches (which actually read the HTML), not proxy caches (which almost never read the HTML in the document).”

If a page is changed “nearly every day”, it will hardly be a problem in practical terms. And in any case, it’s something to be handled at the server level, by making the server send some useful expiration information, using whatever needs to be done on a specific server. Telling that a page expired twenty years ago is hardly a good idea if you can expect its lifetime to be a day or more, or at least several hours. Defeating proxy caching brutally wouldn’t be a good idea (and meta tags won’t do that, so the errors in a sense cancel out each other, so to say This has to be at the beginning of the file, with nothing before (e.g. no blank). This is a brute force variation, some adjustments are useful. (Server supporting PHP is recommended)Meta-tags wont work with proxies. Proxies don’t work on the ‘HTML-layer’ but HTTP. Things depend on proxy settings also.”The Pragma header is generally ineffective because its meaning is not standardized and few caches honor it. Using <meta http-equiv=…> elements in HTML documents is also generally ineffective; some browsers may honor such markup, but other caches ignore it completely.” – Web Design Group That’s because the no-cache pragma is supposed to be part of a HTTP *request*. And *this* has been standardized since way back.

SAP QUESTIONS

1. What is ERP?

Page 45: All Types of Interview Questions

Ans: ERP stands for “Enterprise Resource Planning” it is all with techniques and concepts for an integrated business, which results effectively in the use of management resources, efficiency of an enterprise. It has been targeted for various businesses and has been integrating information across the company from manufacturing to small shops using ERP software.

2. What does SAP stand for?

Ans: SAP stands for “Systems Applications and Products in Data Processing”; it was started by five former IBM employees in Mannheim, Germany, states which is the world’s largest inter-enterprise software company in the year 1972. The original name of SAP in German is “Systeme Anwendungen Produkte”.

3. What is IDES?

Ans: IDES stands for “International Demonstration and Education System”. It was only a demo system with all applications in order to learn faster and implementation.

4. What is SAP R/3 and what are application, database and presentation servers?

Ans: SAP R/3 is a third generation system with highly integrated software modules that perform the business function based on multinational leading practice. The application, database and presentation servers are located at different system in R/3 system. Coming to the application layer of an R/3 System is made up of the application servers and the message server, it runs on application server, as well it communicates each other with presentation components, database using the message server. The complete data is stored in Centralized Server and that server is called as database server.

5. What is a Client?

Ans: Abstract class is a class designed with implementation gaps for subclasses to fill in and is deliberately incomplete.

6. What is Customization and Configuration?

Ans: The process of mapping SAP system to the business process by customizing or adapting the system to the business requirement. This process is known as Customization. Configuring the system in order to meet the needs of a business by using the existing data.

7. Some Important Transactions Codes of SAP?

Ans:

SPRO    DEFINE ITEM CATEGORYMM01    CREATE MATERIALMM02    MODIFY MATERIAL

Page 46: All Types of Interview Questions

MM03    DISPLAY MATERIALVA01    CREATE ORDERVA02    CHANGE ORDERVA03    DISPLAY ORDERCA01    CREATE ROUTINGCA02    EDIT  ROUTINGCA03    DISPLAY ROUTINGO/S2    DEFINE SERIAL NO PROFILEO/S1    DEFINE CENTRAL CONTROL PARAMETERS FORSRNOSM30   TO REMOVE LOCK ENTRY

Shell Scripting   Interview Questions

What is shell scripting?

Shell Script is series of command written in plain text file. Shell script is just like batch file in MS-DOS but have more power than the MS-DOS batch file.

It means shell accept command from you (via keyboard) and execute them. But if you use command one by one (sequence of ‘n’ number of commands), then you can store this sequence of command to text file and tell the shell to execute this text file instead of entering the commands.

Why Shell Scripting?

Shell scripts can take input from a user or file and output them to the screen.Whenever you find yourself doing the same task over and over again you should use shell scripting i.e. repetitive task automation

* Creating your own power tools/utilities.* Automating command input or entry.* Customizing administrative task.* Creating simple applications.

Since scripts are well tested, the chances of errors are reduced while configuring services or system administration task such as adding new users.

Practical examples where shell scripting actively useSystem Administration / Database Administration/ Testing/ Automation /Data centers (SAN) etc.

* Monitoring your Linux system.* Data backup and creating snapshots.

Page 47: All Types of Interview Questions

* Creating email based alert system.* Find out what processes are eating up your system resources.* Find out available and free memory.* Find out all logged in users and what they are doing.* User administration as per your own security policies.* Find out the name of the MP3 file you are listening to.* Monitor your domain expiry date every day.

FAQ’s

What is Shell?

SHELL is a command line Interpreter, Interface between User and Kernel.

#à Admin prompt$àUser prompt

What is a command used to monitor the tasks running?#top

What is the command to know the current shell?# echo $SHELL$ echo $SHELL

What are the commands to see the content of zipped files?#/$lsFile.gz sample#/$zcat File.gz— to see the contents of File.gz#/$cat sample—to see the contents of file sample

Command to know the type of files?

#/$file * ->Displays all files and its types#/$file filename -> Displays specified file name

Security Interview Questions

1. Is Web Sphere certified on People Tools 8.1 xs?

No. IBM Web Sphere is certified on People Tools 8.4 only. Customer wishing to use IBM Web Sphere with People Tools 8.1 xs may take advantage of an IBM Web Sphere for early adopters program, created and managed by IBM. Further information about this program can be found in

Page 48: All Types of Interview Questions

the whitepaper The IBM Web Sphere 8.1x Early Adopter Program. Are there additional license requirements for IBM Web Sphere

2. Are disconnected mobile applications supported in People Tools 8.1x?

No. The PeopleSoft Mobile Agent architecture, which is used to support disconnected mobile applications, is only available in People Tools 8.4. The PeopleSoft Mobile Agent is dependent upon certain core technologies that were specifically developed for People Tools 8.4.

3. Why did PeopleSoft bundle IBM Web Sphere Advanced Single Server Edition rather than Advanced Edition?

The Advanced Single Server Edition (AEs) of Web Sphere provides the same core J2EE and Web Services programming model as the Advanced Edition (AE) with simplified administration. In the AE version Web Sphere uses DB2 or other standard database to keep the configuration and runtime information to support very large farm of Web Sphere servers. However, it is one more database to install, administer and maintain. The AEs version does not use the database and uses file based configuration in a way that is similar to BEA Web Logic. PeopleSoft and IBM Web Sphere architects determined that AEs version would satisfy the deployment requirements of PeopleSoft customers and would make it easy for owning and administering PeopleSoft Applications based on Web Sphere.

3. Why did PeopleSoft bundle IBM Web Sphere Advanced Single Server Edition rather than Advanced Edition?

The Advanced Single Server Edition (AEs) of Web Sphere provides the same core J2EE and Web Services programming model as the Advanced Edition (AE) with simplified administration. In the AE version Web Sphere uses DB2 or other standard database to keep the configuration and runtime information to support very large farm of Web Sphere servers. However, it is one more database to install, administer and maintain. The AEs version does not use the database and uses file based configuration in a way that is similar to BEA Web Logic. PeopleSoft and IBM Web Sphere architects determined that AEs version would satisfy the deployment requirements of PeopleSoft customers and would make it easy for owning and administering PeopleSoft Applications based on Web Sphere.

4. Is BEA Web Logic the same thing as the web server that was previously on the Tuxedo CD?

No. The web server that was delivered on the Tuxedo CD has absolutely nothing to do with Web Logic. Web Logic is a web application server that is designed for large-scale production websites. The HTTP server on the Tuxedo CD was only there to provide a mechanism for launching the graphical Tuxedo administration console if the Tuxedo administrator didn’t already have a web server in place. It was never intended for large-scale, production website use only for a system administrator or two.

5. Is web server load balancing supported with People Tools 8.4?

Page 49: All Types of Interview Questions

Customers can set up clusters of BEA Web Logic or IBM Web Sphere servers to do web server load balancing. In such scenarios, if an instance is down, requests are automatically routed to another instance. For more information on high availability and clustering with Web Logic, Web Sphere and other web servers.

6. Will the PeopleSoft Internet Architecture, now that it embeds BEA Web Logic and IBM Web Sphere, work with my other corporate web servers and tools?

One of the core values of the People Tools development group is investment protection. The time, money and resources that you may have already invested in licensing another web server, training developers and administrators, building and deploying other web applications will not be compromised by this decision. How is this accomplished?

7. IBM how should Web Application Servers be used with People Tools 8.1x and People Tools 8.4?

The PeopleSoft Internet Architecture uses a web application server and an HTTP server. People Tools 8.12 and above include both BEA Web Logic and Apache with Jserv. With People Tools 8.4, both BEA Web Logic and IBM Web Sphere are bundled. Apache with Jserv is no longer a supported web application server combination. Customers can choose which web application server to run during installation time. In a mixed People Tools 8.1 xs and 8.4 environments, each People Tools installation should have their own chain of web application server and application server, PeopleSoft Proprietary and Confidential Page 5and these can be on the same machine. For example, a People Tools 8.1xinstallation using Apache and Jserv could reside on the same machine as a People Tools 8.4 installation using IBM Web Sphere. Care should be taken to ensure that unique port numbers are assigned to each server chain.

8. How does the PeopleSoft Enterprise Portal work with 8.1x and 8.4 applications?

There are several scenarios that may exist when customers use the PeopleSoft Enterprise Portal with a mixture of 8.1x and 8.4 applications. Specific information on the use of the PeopleSoft Enterprise Portal in a blended environment will be available in a forthcoming white paper, which will be available on Customer Connection. In general, the recommendation is to use the PeopleSoft Enterprise Portal 8.4with 8.1x and 8.4 applications, rather than an older version.

9. For the server layer on the web server, what version of the Java Servlet API are the PIA Java Serves coded to with People Tools 8.4?

The PIA Java servlets in People Tools 8.4 are coded to JavaSoft’s Java Servlet API 2.0 and are fully compatible with Servlet API 2.2. It should be noted that the PeopleSoft Internet Architecture is supported only on the BEA Web Logic and Web Sphere servlet engines.

10. Are there advantages or disadvantages to using BEA Web Logic over IBM Web Sphere or vice versa?

Page 50: All Types of Interview Questions

No. Both products are certified with PIA as of version 8.4 and work equally well. By offering both BEA Web Logic and IBM Web Sphere, we give our customers more choices and flexibility to run PeopleSoft in their preferred environment.

11. Does Application Messaging work between 8.1xand 8.4 applications?

Application Messaging is used by PeopleSoft applications to communicate with one another. This is true not just for 8.1x and 8.4 applications, but also between an 8.1x and an 8.4 application. For example, the HRMS 8.3 applications, which are based on People Tools 8.15, can communicate with Financials 8.4applications, which are based on People Tools 8.4, using Application Messaging. If specific issues materialize relating to the Application Messages published by certain applications, these new messages will be made available to customers.

12. Both BEA Web Logic and IBM Web Sphere have the ability to plug into many different web servers. Does PeopleSoft support the web servers that they plug into?

BEA and IBM provide plug-ins for many of the leading web servers. This allows the customer to use their own HTTP web server and Web Logic or Web Sphere Java servlet engine. PeopleSoft uses this plug-in capability to support IIS. We have no reason to believe that there will be any issues with other web servers that Web Logic or Web Sphere are able to work with through their plug-in architecture, but PeopleSoft GSC will not support these other web servers with People Tools 8.4

Springs Interview Questions

1. What is Application Context?

A bean factory is fine to simple applications, but to take advantage of the full power of the spring framework, you may want to move up to springs more advanced container, the application context. On the surface, an application context is same as a bean factory. Both load bean definitions, wire beans together, and dispense beans upon request. But it also provides:

*A generic way to load file resources.

*Events to beans that are registered as listeners.

2. What is Spring?

Spring is an open source framework created to address the complexity of enterprise application development. One of the chief advantages of the Spring framework is its layered architecture, which allows you to be selective about which of its components you use while also providing a cohesive framework for J2EE application development.

Page 51: All Types of Interview Questions

3. What are features of Spring?

Lightweight:

Spring is lightweight when it comes to size and transparency. The basic version of spring framework is around 1MB. And the processing overhead is also very negligible.

Inversion of control (IOC):

Loose coupling is achieved in spring using the technique Inversion of Control. The objects give their dependencies instead of creating or looking for dependent objects.

Aspect oriented (AOP):

Spring supports Aspect oriented programming and enables cohesive development by separating application business logic from system services.

Container:

Spring contains and manages the life cycle and configuration of application objects.

MVC Framework:

Spring comes with MVC web application framework, built on core spring functionality. This framework is highly configurable via strategy interfaces, and accommodates multiple view technologies like JSP, Velocity, Tiles, iText, and POI. But other frameworks can be easily used instead of Spring MVC Framework.

Transaction Management:

Spring framework provides a generic abstraction layer for transaction management. This allowing the developer to add the pluggable transaction managers, and making it easy to demarcate transactions without dealing with low-level issues. Spring’s transaction support is not tied to J2EE environments and it can be also used in container less environments.

JDBC Exception Handling:

The JDBC abstraction layer of the spring offers a meaningful exception hierarchy, which simplifies the error handling strategy. Integration with Hibernate, JDO, and iBATIS: Spring provides best Integration services with Hibernate, JDO and iBATIS.

4. What is Bean Factory?

A Bean Factory is like a factory class that contains a collection of beans. The Bean Factory holds Bean Definitions of multiple beans within itself and then instantiates the bean whenever asked for by clients.

Page 52: All Types of Interview Questions

* Bean Factory is able to create associations between collaborating objects as they are instantiated. This removes the burden of configuration from bean itself and the beans client.

* Bean Factory also takes part in the life cycle of a bean, making calls to custom initialization and destruction methods.

5. How many modules are there in spring? What are they?

Spring comprises of seven modules. They are..

The core container:

The core container provides the essential functionality of the spring framework. A primary component of the core container is the Bean Factory, an implementation of the Factory pattern. The Bean Factory applies the Inversion of Control (IOC) pattern to separate an application’s configuration and dependency specification from the actual application code.

Spring context:

The spring context is a configuration file that provides context information to the Spring framework. The spring context includes enterprise services such as JNDI, EJB, e-mail, internalization, validation, and scheduling functionality.

Spring AOP:

The Spring AOP module integrates aspect-oriented programming functionality directly into the spring framework, through its configuration management feature. As a result you can easily AOP-enable any object managed by the spring framework. The Spring AOP module provides transaction management services for objects in any pring-based application. With Spring AOP you can incorporate declarative transaction management into your applications without relying on EJB components.

Spring DAO:

The Spring JDBC DAO abstraction layer offers a meaningful exception hierarchy for managing the exception handling and error messages thrown by different database vendors. The exception hierarchy simplifies error handling and greatly reduces the amount of exception code you need to write, such as opening and closing connections.Spring DAO’s JDBC-oriented exceptions comply to its generic DAO exception hierarchy.

Spring ORM:

The spring framework plugs into several ORM frameworks to provide its Object Relational tool, including JDO, Hibernate, and iBatis SQL Maps. All of these comply to spring’s generic transaction and DAO exception hierarchies.

Page 53: All Types of Interview Questions

Spring Web module:

The Web context module builds on top of the application context module, providing contexts for Web-based applications. As a result, the spring framework supports integration with Jakarta Struts. The Web module also eases the tasks of handling multi-part requests and binding request parameters to domain objects.

Spring MVC framework:

The Model-View-Controller (MVC) framework is a full-featured MVC implementation for building Web applications. The MVC framework is highly configurable via strategy interfaces and accommodates numerous view technologies including JSP, Velocity, Tiles iText, and POI.

6. What is IOC (or Dependency Injection)?

The basic concept of the Inversion of Control pattern (also known as dependency injection) is that you do not create your objects but describe how they should be created. You don’t directly connect your components and services together in code but describe which services are needed by which components in a configuration file. A container (in the case of the spring framework, the IOC container) is then responsible for hooking it all up.

i.e., Applying Icon objects are given their dependencies at creation time by some external entity that coordinates each object in the system. That is, dependencies are injected into objects. So, Icon means an inversion of responsibility with regard to how an object obtains references to collaborating objects.

7. What are the different types of IOC (dependency injection)?

There are three types of dependency injection:* Constructor Injection (e.g. Pico container, Spring etc): Dependencies are provided as constructor parameters.* Setter Injection (e.g. spring): Dependencies are assigned through JavaBeans properties (ex: setter methods).

* Interface Injection (e.g. Avalon): Injection is done through an interface.

8. What are the benefits of IOC (Dependency Injection)?

Benefits of IOC (Dependency Injection) are as follows:

*Minimizes the amount of code in your application. With IOC containers you do not care about how services are created and how you get references to the ones you need. You can also easily add additional services by adding a new constructor or a setter method with little or no extra configuration.

Page 54: All Types of Interview Questions

*Make your application more testable by not requiring any singletons or JNDI lookup mechanisms in your unit test cases. IOC containers make unit testing and switching implementations very easy by manually allowing you to inject your own objects into the object under test.

*Loose coupling is promoted with minimal effort and least intrusive mechanism. The factory design pattern is more intrusive because components or services need to be requested explicitly whereas in IOC the dependency is injected into requesting piece of code. Also some containers promote the design to interfaces not to implementations design concept by encouraging managed objects to implement a well-defined service interface of your own.

*IOC containers support eager instantiation and lazy loading of services. Containers also provide support for instantiation of managed objects, cyclical dependencies, life cycles management, and dependency resolution between managed objects etc.

9. What are the advantages of spring framework?

The advantages of spring are as follows:

* Spring has layered architecture. Use what you need and leave you don’t need now.

* Spring Enables POJO Programming. There is no behind the scene magic here. POJO programming enables continuous integration and testability.

* Dependency Injection and Inversion of Control Simplifies JDBC

* Open source and no vendor lock-in.

10. What are the types of Dependency Injection Spring supports?

Setter Injection:

Setter-based DI is realized by calling setter methods on your beans after invoking a no-argument constructor or no-argument static factory method to instantiate your bean.

Sql Server Interview Questions

1. Explain about SQL?

It is an interactive and programming language which is used to modify, manage, and to pass queries. It is an ANSI and ISO compliant language. SQL entirely depends upon its command

Page 55: All Types of Interview Questions

language for modifications, changes, updating, etc to the database. Databases can also be accessible remotely with the help of Call level interface.

2. Explain about Call level interface present in SQL?

In depth explanation of this interface is present in ISO/IEC 9075-3:2003. This extension defines components which can be used to execute SQL statements written in other programming languages. This extension is defined in such a way that the statements and procedure calls from SQL be different from the applications source code.

3 Explain about the object language binding’s extension?

This extension is very useful if you are planning to use SQL in Java. This extension defines the syntax and procedure to follow for SQL embedded in Java. It also makes sure of the syntax and procedures to follow which ensures the portability of SQL embedded Java in binary applications.

4. Explain about SQL related to RDBMS?

SQL is known as structured query language. It is especially designed to retrieve and store information of data in relational database management systems. It creates, modifies and makes the data base object user access the control system. It is primarily specialized software for RDBMS.

5. Explain about the original design and basics which gave life to SQL?

SQL was originally designed to be a declarative and data manipulation language. Additions to the language occurred because of addition of new features from vendors such as constructs, data types, extensions and control flow statements. Important extensions were added to SQL. Cross platform compatibility has been the main issue for SQL.

6. Explain about XML related specifications?

XML is a very powerful DOM language. Often this language is used with many databases applications as a front end, SQL acts as a backend to support the Database queries. This specification has several extensions which defines routines, functions, data type mappings, storage, etc.

7. State the several languages into which SQL is divided into?

SQL is divided into several sub divisions such as• Statements• Queries• Expressions• Predicates• Clauses

Page 56: All Types of Interview Questions

• White space• Statement terminator

8. Explain about the information and definition schemas?

This information and definition schema helps the user by giving necessary information about the tools and functions of SQL. It describes several tools and extensions some of them are object identifier, security, features provided by DBMS, authorization, values, sizing items, etc. This is defined by ISO specification.

9. Explain the where clause?

Where clause has a comparison predicate which restricts the number of rows as per the user generated query. This clause should be applied before the GROUP BY clause. This clause functions with the help of comparison predicate, when a comparison predicate does not evaluate a result to be true, all rows from the end result are deleted.

10. Explain about predicates and statements?

Statements have a prolonged effect on the functioning and behavior of the data, care should be taken before defining a statement to the data. It may control transactions, query, sessions, connections and program flow Predicates specified conditions which can be evaluated to three valued logic. Boolean truth values can limit the effect of the statements, program functioning, queries, etc.

11 Explain about data retrieval?

Data retrieval syntax is often used in combination with data projection. This mechanism is used when there is a need for calculated result. This is used when there is a special need for calculated data and not the verbatim data, which is different from the way it was stored in the database.

12. Explain the ORDER BY clause?

Orderby clause identifies the columns which are used to sort the data and the order in which they should be sorted out. SQL query needs to specify orderly clause of they want the data to be returned in a defined manner of rows and columns.

13. Explain about the MERGE field?

MERGE is used when you need to combine more than one table for a user generated query. This field can be aptly said as a combination of INSERT and UPDATE elements. This field is also given a different name (upsert) in some versions of SQL.

Page 57: All Types of Interview Questions

14. Explain about Data definition?

Data definition Language is used to define new tables and elements associated with it. Some of the basic data definition language elements are CREATE, TRUNCATE, ALTER, RENAME, etc. These are used to control the non standard features of the database.

Web Sphere

IBM WebSphere is an application server. IBM WebSPhere is the the leading software for e-business on demand providing comprehensive e-business leadership. WebSphere is architected to enable you to build business-critical applications for the web. WebSphere includes a wide range of products that help you to develop and serve the Web applications. They are designed to make it easier for the clients to build, Deploy and Manage dynamic web sites more productively.

WebSphere provides solutions for connecting people, systems, and applications with internal and external resources. WebSphere is based on infrastructure middleware service designed for e-business.It delivers a proven, secure and reliable software portfolio that can provide an excellent return on investment.

WebSphere is developed based on JAVA/J2EE technologies. So it can support Java/J2EE applications. IBM WebSphere Administration has the responsibility to define the Environment for an application and Configuring the Servers, machines and Data Base. It has the responsibility to deploy and manage the application. It has the responsibility to support the application and monitoring the performance of the application and servers and improve the performance of the application servers. If any issues come solving that issues.

Before application servers we have the web servers like apache, sun one, I planet, IIS etc. Web Servers have the web container will provide the runtime environment to the Web applications nothing but will execute only Servlets and JSP’s and It will generate static web pages.

When you are using the web servers can only server static content. When you are using web servers we can only fetch the data from the Data Base, but we can’t update the data to the Data Base. If you want to interact with Data Base you need to write set of lines of code in java. Web servers will not provides the service like JDBC, JMS, and Security. Web servers does not give support to the EJB’s. The Web servers will not give the transaction support also. Web server can also process the requests coming from the HTTP only. Web servers will not give the full support the J2EE.

While coming to the Application Server (WebSphere, WebLogic, OracleAppServer), Any Application Server have an embedded web server (Web container), which give support to the Web applications. In Addition to that Application server have an EJB container, will provide the runtime environment to the EJB’s. Application server will provide the services like JDBC to

Page 58: All Types of Interview Questions

interact with Data Base, with out writing set of lines of code to interact with Data Base and JMS service to process message oriented requests and It will provide the security also. Application server will have support for transactions. It can process the requests coming from HTTP, TCP/IP, FTP, UDP etc.

Web Logic Server interview questions

1. Can I start a Managed Server if the Administration Server is unavailable?

By default, if a Managed Server is unable to connect to the specified Administration Server during startup, it can retrieve its configuration by reading a configuration file and other files directly. You cannot change the server’s configuration until the Administration Server is available. A Managed Server that starts in this way is running in Managed Server Independence mode.

2.How are notifications made when a server is added to a cluster?

The Web Logic Server cluster broadcasts the availability of a new server instance each time a new instance joins the cluster. Cluster-aware stubs also periodically update their list of available server instances.

3.When should I use the external stage option?

Set -external stage using weblogic. Deployer if you want to stage the applicationyourself,and prefer to copy it to its target by your own means.

4.How do I provide user credentials for starting a server?

When you create a domain, the Configuration Wizard prompts you to provide the user name and password for an initial administrative user. If you create the domain in development mode, the wizard saves the username and encrypted password in a boot identity file. A Web Logic Server instance can refer to a boot identity file during its startup process. If a server instance does not find such a file, it prompts you to enter credentials.

If you create a domain in production mode, or if you want to change user credentials in an existing boot identity file, you can create a new boot identity file.

5.How do you set the class path?

Web Logic Server installs the following script that you can use to set the class path that a server requires:

Page 59: All Types of Interview Questions

WL_HOME\server\bin\setWLSEnv.cmd (on Windows)WL_HOME/server/bin/setWLSEnv.sh (on UNIX)Where WL_HOME is the directory in which you installed Web Logic Server.

6.How do stubs work in a Web Logic Server cluster?

Clients that connect to a Web Logic Server cluster and look up a clustered object obtain a replica-aware stub for the object. This stub contains the list of available server instances that host implementations of the object. The stub also contains the load balancing logic for distributing the load among its host servers.

7.What happens when a failure occurs and the stub cannot connect to a Web Logic Server instance?

When the failure occurs, the stub removes the failed server instance from its list. If  there are no servers left in its list, the stubb uses DNS again to find a running server and obtain a current list of running instances. Also, the stub periodically refreshes its list of available server instances in the cluster; this allows the stub to take advantage of new servers as they are added to the cluster.

8.How do clients handle DNS requests to failed servers?

If a server fails and DNS continues to send requests to the unavailable machine, this can waste bandwidth. For a Java client application, this problem occurs only during startup. Web Logic Server caches the DNS entries and removes the unavailable ones, to prevent the client from accessing a failed server twice.

Failed servers can be more of a problem for browser-based clients, because they always use DNS. To avoid unnecessary DNS requests with browser-based clients, use a third-party load-balancer such as Resonate, BigIP, Alteon, and Local Director. These products mask multiple DNS addresses as a single address. They also provide more sophisticated load-balancing options than round-robin, and they keep track of failed servers to avoid routing unnecessary requests.

9.Must Ebbs be homogeneously deployed across a cluster? Why?

Yes. In Web Logic Server 6.0 and later, Ebbs must be homogeneously deployed across a cluster for the following reasons:To keep clustering EJBs simpleTo improve performance by avoiding cross-server calls. If EJBs are not deployed on all servers, cross-server calls are more likely.To ensure that every EJB is available locallyTo ensure that all classes are loaded in an undeployable way. Every server must have access to each Ebb’s classes so that it can be bound into the local JNDI tree. If only a subset of the servers deploys the bean, the other servers will have to load the bean’s classes in their respective system class paths which makes it impossible to underplay the beans.

10.What is the function of T3 in Web Logic Server?

Page 60: All Types of Interview Questions

T3 provides a framework for Web Logic Server messages that support for enhancements. These enhancements include abbreviations and features, such as object replacement, that work in the context of Web Logic Server clusters and HTTP and other product tunneling. T3 predates Java Object Serialization and RMI, while closely tracking and leveraging these specifications. T3 is a superset of Java Object. Serialization or RMI; anything you can do in Java Object Serialization and RMI can be done over T3. T3 is mandated between Web Logic Servers and between programmatic clients and a Web Logic Server cluster. HTTP and IIOP are optional protocols that can be used to communicate between other processes and Web Logic Server. It depends on what you want to do. For example, when you want to communicate between a browser and Web Logic Server-use HTTP, or an ORB and Web Logic Server-IIOP.

11How does a server know when another server is unavailable?

Web Logic Server uses two mechanisms to determine if a given server instance is unavailable.

Each Web Logic Server instance in a cluster uses multicast to broadcast regular “heartbeat” messages that advertise its availability. By monitoring heartbeat messages, server instances in a cluster determine when a server instance has failed. The other server instances will drop a server instance from the cluster, if they do not receive three consecutive heartbeats from that server instance

Web Logic Server also monitors socket errors to determine the availability of a server instance. For example, if server instance A has an open socket to server instance B, and the socket unexpectedly closes, server A assumes that server B is offline.

12.How many Web Logic Servers can I have on a multi-cpu machine?

There are many possible configurations and each has its own advantages and disadvantages. BEA Web Logic Server has no built-in limit for the number of server instances that can reside in a cluster. Large, multi-processor servers such as Sun Microsystems, Inc. Sun Enterprise 10000, therefore, can host very large clusters or multiple clusters.

In most cases, Web Logic Server clusters scale best when deployed with one Web Logic Server instance for every two CPUs. However, as with all capacity planning, you should test the actual deployment with your target web applications to determine the optimal number and distribution of server instances.

XML Interview Questions

XML The Extensible Markup Language is a general-purpose specification for creating custom markup languages. It improves the functionalityof the Web by letting you identify your

Page 61: All Types of Interview Questions

information in a more accurate,flexible, and adaptable way. XML is actually a meta language, language for describing

other language, which lets you design your own markup languages for limitless different types of documents.

It is extensible because it is not a fixed format like HTML (which is a single, predefined markup language). It is classified as an extensible language because it allows its users to define their own elements.

Primary purpose of XML is to help information systems share structured data, particularly via the Internet. XML is used both to encode documents and to serialize data.

XML started as a simplified subset of the Standard Generalized Markup Language (SGML), and is designed to be relatively human-legible. By adding semantic constraints, application languages can be implemented in XML. These include XHTML, RSS, MathML, GraphML, Scalable Vector Graphics, MusicXML, and thousands of others. Moreover, XML is sometimes used as the specification language for such application languages.In the latter context, it is comparable with other text-based serialization languages such as JSON and YAML.

There are literally thousands of applications that can benefit from XML technologies. For instance XML allows content management systems to store documents independently of their format thereby reducing data redundancy. Another answer relates to B2B exchanges or supply chain management systems. In these instances, XML provides a mechanism for multiple companies to exchange data according to an agreed upon set of rules. A third common response involves wireless applications that require WML to render data on hand held devices.

Although XML does not require data to be validated against a DTD, many of the benefits of using the technology are derived from being able to validate XML documents against business or technical architecture rules. Polling for the list of DTD’s that developers have worked with provides insight to their general exposure to the technology. The ideal candidate will have knowledge of several of the commonly used DTD’s such as FpML, ebML, DocBook, HRML and RDF, as well as experience designing a custom DTD for a particular project where no standard existed.

1) Explain what is a Markup Language ?

A markup language is a set of words and symbols for describing the identity of pieces of a document (for example ‘this is a paragraph’, ‘this is a heading’, ‘this is a list’, ‘this is the caption of this figure’,

etc). Programs can use this with a style sheet to create output for screen, print, audio, video, Braille, etc.

2.) Differences between XML and HTML.

Page 62: All Types of Interview Questions

Answer -It’s amazing how many developers claim to be proficient programming with XML, yet do not understand the basic differences between XML and HTML. Anyone with a fundamental grasp of XML should be able describe some of the main differences outlined in the table below:

Differences Between XML and HTML

XML

User definable tags

Content driven

End tags required for well formed documents

Quotes required around attributes values

Slash required in empty tags

HTML

Defined set of tags designed for web display

Format driven

End tags not required

Quotes not required

Slash not required

3) DOM and how does it relate to XML?

The Document Object Model (DOM) is an interface specification maintained by the W3C. DOM Workgroup that defines application independent mechanism to access, parse or update XML data. It simple terms it is hierarchical model that allows developers to easily manipulate XML documents. Any developer that has worked extensively with XML should be able to discuss the concept and use of DOM objects freely. Additionally, it is not unreasonable to expect advanced candidates to thoroughly understand its internal workings and be able to explain how DOM differs from event based interface specifications such as SAX.

4) What is SOAP and how does it relate to XML?

OAP consists of three components: an envelope, a set of encoding rules, and a convention for representing remote procedure calls. The Simple Object Access Protocol (SOAP) uses XML to define a protocol for the exchange of information in distributed computing environments. Unless experience with SOAP is a direct requirement for the open position, knowing the specifics of the

Page 63: All Types of Interview Questions

protocol or how it can be used in conjunction with HTTP is not as important as identifying it as a natural application of XML.

JAVA INTERVIEW QUESTIONS

Java Exception Handling Interview Questions

1 which package contains exception handling related classes?

Ans: java. Lang

2 what are the two types of Exceptions?

Ans: Checked Exceptions and Unchecked Exceptions.

3 what is the base class of all exceptions?

Ans: java.lang.Throwable

4 what is the difference between Exception and Error in java?

Ans: Exception and Error are the subclasses of the Throw able class. Exception class is used for exceptional conditions that user program should catch. Error defines exceptions that are not excepted to be caught by the user program. Example is Stack Overflow.

5 what is the difference between throw and throws?

Ans: throw is used to explicitly raise a exception within the program, the statement would be throw new Exception (); throws clause is used to indicate the exceptions that are not handled by the method. It must specify this behavior so the callers of the method can guard against the exceptions. Throws is specified in the method signature. If multiple exceptions are not handled, then they are separated by a comma. The statement would be as follows: public void do something () throws IOException, MyException {}

6 Differentiate between Checked Exceptions and Unchecked Exceptions?

Ans: Checked Exceptions are those exceptions which should be explicitly handled by the calling method. Unhandled checked exceptions results in compilation error.

Page 64: All Types of Interview Questions

Unchecked Exceptions are those which occur at runtime and need not be explicitly handled. Runtime Exception and its subclasses, Error and its subclasses fall under unchecked exceptions.

7 what are User defined Exceptions?

Ans: Apart from the exceptions already defined in Java package libraries, user can define his own exception classes by extending Exception class.

8 what is the importance of finally block in exception handling?

Ans: Finally block will be executed whether or not an exception is thrown. If an exception is thrown, the finally block will execute even if no catch statement match the exception. Any time a method is about to return to the caller from inside try/catch block, via an uncaught exception or an explicit return statement, the finally block will be executed. Finally is used to free up resources like database connections, IO handles, etc.

9 Can a catch block exist without a try block?

Ans: No. A catch block should always go with a try block.

10 Can a finally block exist with a try block but without a catch?

Ans: Yes. The following are the combinations try/catch or try/catch/finally or try/finally.

11 what will happen to the Exception object after exception handling?

Ans: Exception object will be garbage collected.

12 The subclass exception should precede the base class exception when used within the catch clause. True/False?

Ans: True.

13 Exceptions can be caught or rethrown to a calling method. True/False?

Ans: True.

14 The statements following the throw keyword in a program are not executed. True/False?

Ans: True.

15 How does finally block differ from finalize () method?

Ans: Finally block will be executed whether or not an exception is thrown. So it is used to free resoources. Finalize () is a protected method in the Object class which is called by the JVM just before an object is garbage collected.

Page 65: All Types of Interview Questions

16 what are the constraints imposed by overriding on exception handling?

Ans: An overriding method in a subclass May only throw exceptions declared in the parent class or children of the exceptions declared in the parent class.

Java Threads Interview Questions

1 what are the two types of multitasking?

Ans:a. Process-based.b. Thread-based.

2 what is a Thread?

Ans: A thread is a single sequential flow of control within a program.

3 what are the two ways to create a new thread?

Ans: A.Extend the Thread class and override the run () method.B.Implement the Runnable interface and implement the run () method.

4 If you have ABC class that must subclass XYZ class, which option will you use to create a thread?

Ans: I will make ABC implement the Runnable interface to create a new thread, because ABC class will not be able to extend both XYZ class and Thread class.

5 which package contains Thread class and Runnable Interface?

Ans: java. Lang package

6 what is the signature of the run () mehod in the Thread class?

Ans: public void run ()

7 shich methods calls the run () method?

Ans: start () method.

8 which interface does the Thread class implement?

Ans: Runnable interface

Page 66: All Types of Interview Questions

9 what are the states of a Thread?

Ans: Ready, Running, Waiting and Dead.

10 where does the support for threading lie?

Ans: The thread support lies in java.lang.Thread, java.lang.Object and JVM.

11 In which class would you find the methods sleep () and yield ()?

Ans: Thread class

12 In which class would you find the methods notify (), notify All () and wait ()?

Ans: Object class

13  what will notify () method do?

Ans: notify() method moves a thread out of the waiting pool to ready state, but there is no guaranty which thread will be moved out of the pool.

14 Can you notify a particular thread?

Ans: No.

15 what is the difference between sleep () and yield ()?

Ans: When a Thread calls the sleep () method, it will return to its waiting state. When a Thread calls the yield () method, it returns to the ready state.

16 what is a Daemon Thread?

Ans: Daemon is a low priority thread which runs in the backgrouund.

17 How to make a normal thread as daemon thread?

Ans: We should call set Daemon (true) method on the thread object to make a thread as daemon thread.

18 what is the difference between normal thread and daemon thread?

Ans: Normal threads do mainstream activity, whereas daemon threads are used low priority work. Hence daemon threads are also stopped when there are no normal threads.

19  Give one good example of a daemon thread?

Page 67: All Types of Interview Questions

Ans: Garbage Collector is a low priority daemon thread.

20 what does the start () method of Thread do?

Ans: The thread’s start () method puts the thread in ready state and makes the thread eligible to run. Start () method automatically calls the run () method.

Awt Swing Interview Questions

1 what is the difference between a Choice and a List?

Ans: A Choice is displayed in a compact form that requires you to pull it down to see the list of available choices. Only one item may be selected from a Choice. A List may be displayed in such a way that several List items are visible. A List supports the selection of one or more List items.

2 what interface is extended by AWT event listeners?

Ans: All AWT event listeners extend the java.util.EventListener interface.

3 what is a layout manager?

Ans: A layout manager is an object that is used to organize components in a container.

4 Which Component subclass is used for drawing and painting?

Ans: Canvas

5 what is the difference between a Scrollbar and a Scroll Pane?

Ans: A Scrollbar is a Component, but not a Container. A Scroll Pane is a Container. A Scroll Pane handles its own events and performs its own scrolling.

6 Which Swing methods are thread-safe?

Ans: The only thread-safe methods are repaint (), revalidate (), and invalidate ()

7 which containers use a border Layout as their default layout?

Ans: The Window, Frame and Dialog classes use a border layout as their default layout

8 what is the preferred size of a component?

Page 68: All Types of Interview Questions

Ans: The preferred size of a component is the minimum component size that will allow the component to display normally

9 which containers use a Flow Layout as their default layout?

Ans: The Panel and Applet classes use the Flow Layout as their default layout

10 what is the immediate super class of the Applet class?

Ans: Panel

11 Name three Component subclasses that support painting?

Ans: The Canvas, Frame, Panel, and Applet classes support painting

12 what is the immediate super class of the Dialog class?

Ans: Window

13 what is clipping?

Ans: Clipping is the process of confining paint operations to a limited area or shape.

14 what is the difference between a Menu Item and a Check box MenuItem?

Ans: The Checkbox Menu Item class extends the MenuItem class to support a menu item that may be checked or unchecked.

15 what class is the top of the AWT event hierarchy?

Ans: The java.awt.AWTEvent class is the highest-level class in the AWT event-class hierarchy

16 In which package are most of the AWT events that support the event-delegation model defined?

Ans: Most of the AWT-related events of the event-delegation model are defined in the java.awt.event package. The AWTEvent class is defined in the java.awt package.

17 which class is the immediate super class of the Menu Component class?

Ans: Object

18 which containers may have a Menu Bar?

Ans: Frame

Page 69: All Types of Interview Questions

19 what is the relationship between the Canvas class and the Graphics class?

Ans: A Canvas object provides access to a Graphics object via its paint () method.

20 How are the elements of a Border Layout organized?

Ans: The elements of a Border Layout are organized at the borders (North, South, East, and West) and the center of a container.

Java Garbage Collection Interview Questions

1 Explain Garbage collection in Java?

Ans: In Java, Garbage Collection is automatic. Garbage Collector Thread runs as a low priority daemon thread freeing memory.

2 When does the Garbage Collection happen?

Ans: When there is not enough memory. Or when the daemon GC thread gets a chance to run.

3 When is an Object eligible for Garbage collection?

Ans: An Object is eligible for GC, when there are no references to the object.

4 what are two steps in Garbage Collection?

Ans: 1. Detection of garbage collectible objects and marking them for garbage collection.2. Freeing the memory of objects marked for GC.

5 what is the purpose of finalization?

Ans: The purpose of finalization is to give an unreachable object the opportunity to perform any cleanup processing before the object is garbage collected.

6 Can GC be forced in Java?

Ans: No. GC can’t be forced.

7 what does System.gc () and Runtime.gc () methods do?

Ans: These methods inform the JVM to run GC but this is only a request to the JVM but it is up to the JVM to run GC immediately or run it when it gets time.

8 When is the finalize () called?

Page 70: All Types of Interview Questions

Ans: finalize () method is called by the GC just before releasing the object’s memory. It is normally advised to release resources held by the object in finalize () method.

9 Can an object be resurrected after it is marked for garbage collection?

Ans: Yes. It can be done in finalize () method of the object but it is not advisable to do so.

10 Will the finalize () method run on the resurrected object?

Ans: No. finalize () method will run only once for an object. The resurrected objects will not be cleared till the JVM cease to exist.

11 GC is single threaded or multi threaded?

Ans: Garbage Collection is multi threaded from JDK1.3 onwards.

12 what are the good programming practices for better memory management?

Ans: a. We shouldn’t declare unwanted variables and objects.b. We should avoid declaring variables or instantiating objects inside loops.c. When an object is not required, its reference should be nullified.d. We should minimize the usage of String object and SOP’s.

13 When is the Exception object in the Exception block eligible for GC?

Ans: Immediately after Exception block is executed.

14 When are the local variables eligible for GC?

Ans: Immediately after method’s execution is completed.

15 If an object reference is set to null, Will GC immediately free the memory held by that object?

Ans: No. It will be garbage collected only in the next GC cycle.

Applets Interview Questions

1 what is an Applet?

Ans: Applet is a java program which is included in a html page and executes in java enabled client browser. Applets are used for creating dynamic and interactive web applications.

2 Explain the life cycle of an Applet?

Page 71: All Types of Interview Questions

Ans: The following methods implement the life cycle of an Applet:Init: To initialize the applet each time it’s loaded (or reloaded).Start: To start the applet’s execution, such as when the applets loaded or when the user revisits a page that contains the applet.Stop: To stop the applet’s execution, such as when the user leaves the applet’spage or quits the browser.Destroy: To perform a final cleanup in preparation for unloading.

3 what happens when an applet is loaded?

Ans: The following sequence happens when an applet is loaded:a) An instance of the applet’s controlling class (an Applet subclass) is created.b) The applet initializes itself.c) The applet starts running.

4 How to make my class as an applet?

Ans: Your class must directly or indirectly extend either Applet or JApplet.

5 what is Applet Context?

Ans: Applet Context is an interface which provides information about applet’s environment.

6 what is the difference between an Applet and a Java Application?

Ans: The following are the major differences between an Applet and an Application:

a. Applets execute within a java enabled browser but an application is a standalone

Java program outside of a browser. Both require a JVM (Java Virtual Machine).

b. Application requires main () method to trigger execution but applets doesn’t need a main () method. Applets use the init (), start (), stop () and destroy () methods for their life cycle.

c. Applets typically use a fairly restrictive security policy. In a standalone application, however, the security policy is usually more relaxed.

7 what happens when a user leaves and returns to an applet’s page?

Ans: When the user leaves the page, the browser stops the applet and when the user returns to the page, the browser starts the applet and normally most browser’s don’t initialise the applet again.

8 what are the restrictions imposed on an applet?

Ans: Due to Security reasons, the following restrictions are imposed on applets:a. An applet cannot load libraries or define native methods.

Page 72: All Types of Interview Questions

b. It cannot ordinarily read or write files on the host that’s executing it.c. It cannot make network connections except to the host that it came from.d. It cannot start any program on the host that’s executing it.e. It cannot read certain system properties.

9 Can a applet invoke public methods of another applet on the same page?

Ans: Yes. It’s possible.

10 what are untrusted applets?

Ans: By default, all downloaded applets are untrusted. Untrusted Applets are those applets which cannot access or exceute local system files.

11 How to let a downloaded applet to read a file in the local system?

Ans: To allow any files in the directory /home/user1 to be read by applets loaded into the applet viewer, add the following line to your <user home directory>/.hotjava/properties file.acl.read=/home/user1you can specify one file to be read:acl.read=/home/user1/somedir/somefile

12 How to let a downloaded applet to write to a file in the local system?

Ans: You can allow applets to write to your /tmp directory by setting the acl.writeproperty in your <user home directory>/.hotjava/properties file:acl.write=/tmpYou can allow applets to write to a particular file by naming it explicitly:acl.write=/home/user1/somedir/somefile

13 How do I hide system properties that applets are allowed to read?

Ans: To hide the name of the operating system that you are using, add the following line to your <user home directory>/.hotjava/properties file:os.name=null

14 How can I allow applets to read system properties that they aren’t allowed to read?

Ans: To allow applets to record your user name, add the following line to your <user home directory>/.hotjava/properties file:user.name.applet=true

15 How can an applet open a network connection to a computer on the internet?

Page 73: All Types of Interview Questions

Ans: Applets are not allowed to open network connections to any computer, except for the host that provided the .class files. This is either the host where the html page came from, or the host specified in the codebase parameter in the applet tag, with codebase taking precedence.

16 Can an applet start another program on the client?

Ans: No, applets loaded over the net are not allowed to start programs on the client. That is, an applet that you visit can’t start some rogue process on your PC. In UNIX terminology, applets are not allowed to exec or fork processes. In particular, this means that applets can’t invoke some program to list the contents of your file system, and it means that applets can’t invoke System. exit () in an attempt to kill your web browser. Applets are also not allowed to manipulate threads outside the applet’s own thread group.

17 what is the difference between applets loaded over the net and applets loaded via the file system?

Ans: There are two different ways that applets are loaded by a Java system. The way an applet enters the system affects what it is allowed to do. If an applet is loaded over the net, then it is loaded by the applet class loader, and is subject to the restrictions enforced by the applet security manager. If an applet resides on the client’s local disk, and in a directory that is on the client’s CLASSPATH, then it is loaded by the

file system loader. The most important differences are :a. applets loaded via the file system are allowed to read and write filesb. applets loaded via the file system are allowed to load libraries on the clientc. applets loaded via the file system are allowed to exec processesd. applets loaded via the file system are allowed to exit the virtual machinee. applets loaded via the file system are not passed through the byte code verifier

18 What’s the applet class loader, and what does it provide?

Ans: Applets loaded over the net are loaded by the applet class loader. Forexample, the applet viewer’s applet class loader is implemented by the classsun.applet.AppletClassLoader.The class loader enforces the Java name space hierarchy. The class loader guarantees that a unique namespace exists for classes that come from the local file system, and that a unique namespace exists for each network source. When a browser loads an applet over the net, that applet’s classes are placed in a private namespace associated with the applet’s origin. Thus, applets loaded from different network sources are partitioned from each other. Also, classes loaded by the class loader are passed through the verifier. The verifier checks that the class file conforms to the Java language specification – it doesn’t assume that the class file was produced by a “friendly” or “trusted” compiler. On the contrary, it checks the class files for purposeful violations of the language type rules and name space restrictions. The verifier ensures that:a. There are no stack overflows or underflows.b. All register accesses and stores are valid.c. The parameters to all byte code instructions are correct.

Page 74: All Types of Interview Questions

d. There is no illegal data conversion.e. The verifier accomplishes that by doing a data-flow analysis of the byte code instruction stream, along with checking the class file format, object signatures, and special analysis of finally clauses that are used for Java exception handling.

19 what’s the applet security manager, and what does it provide?

Ans: The applet security manager is the Java mechanism for enforcing the applet restrictions described above. The applet viewer’s applet security manager is implemented by sun.applet.AppletSecurity.A browser may only have one security manager. The security manager is established at startup, and it cannot thereafter be replaced, overloaded, overridden, or extended.Applets cannot create or reference their own security manager.

20 If other languages are compiled to Java byte codes, how does that affect the applet security model?

Ans: The verifier is independent of Sun’s reference implementation of the Java compiler and the high-level specification of the Java language. It verifies byte codes generated by other Java compilers. It also verifies byte codes generated by compiling other languages into the byte code format. Byte codes imported over the net that pass the verifier can be trusted to run on the Java virtual machine. In order to pass the verifier, byte codes have to conform to the strict typing, the object signatures, the class file format, and the predictability of the runtime stack that are all defined by the Java language implementation.

Java Lang Package Interview Questions

1 what is the base class of all classes?

Ans: java.lang.Object

2 what do you think is the logic behind having a single base class for all classes?

Ans: 1. casting

2. Hierarchial and object oriented structure.

3 why most of the Thread functionality is specified in Object Class?

Ans: Basically for intertribal communication.

4 what is the importance of == and equals () method with respect to String object?

Page 75: All Types of Interview Questions

Ans: == is used to check whether the references are of the same object..equals () is used to check whether the contents of the objects are the same.But with respect to strings, object refernce with same contentwill refer to the same object.

String str1=”Hello”;String str2=”Hello”;

(str1==str2) and str1.equals(str2) both will be true.

If you take the same example with Stringbuffer, the results would be different.Stringbuffer str1=”Hello”;Stringbuffer str2=”Hello”;str1.equals(str2) will be true.str1==str2 will be false.

5 Is String a Wrapper Class or not?

Ans: No. String is not a Wrapper class

6 How will you find length of a String object?

Ans: Using length () method of String class.

7 How many objects are in the memory after the exection of following code segment?

Ans:  String str1 = “ABC”;String str2 = “XYZ”;String str1 = str1 + str2;There are 3 Objects.

8 what is the difference between an object and object reference?

Ans: An object is an instance of a class. Object reference is a pointer to the object. There can be many refernces to the same object.

9 what will trim () method of String class do?

Ans: The trim () eliminate spaces from both the ends of a string. ***

10 what is the use of java.lang.Class class?

Ans: The java.lang.Class class is used to represent the classes and interfaces that are loaded by a java program.

11 what is the possible runtime exception thrown by substring () method?

Page 76: All Types of Interview Questions

Ans: ArrayIndexOutOfBoundsException.

12 what is the difference between String and String Buffer?

Ans: Object’s of String class is immutable and object’s of String Buffer class ismutable moreover String Buffer is faster in concatenation.

13 what is the use of Math class?

Ans: Math class provides methods for mathematical functions.

14 Can you instantiate Math class?

Ans: No. It cannot be instantiated. The class is final and its constructor is private. But all the methods are static, so we can use them without instantiating the Math class.

15 what will Math. abs () do?

Ans: It simply returns the absolute value of the value supplied to the method, i.e. gives you the same value. If you supply negative value it simply removes the sign.

16 what will Math. ceil () do?

Ans: This method returns always double, which is not less than the supplied value.  It returns next available whole number

17 what will Math. floor () do?

Ans: This method returns always double, which is not greater than the supplied value.

18 what will Math. ax () do?

Ans: The max () method returns greater value out of the supplied values.

19 what will Math. in() do?

Ans: The min () method returns smaller value out of the supplied values.

20 what will Math. Random () do?

Ans: The random () method returns random number between 0.0 and 1.0. It always returns double.

Page 77: All Types of Interview Questions

JDBC Interview Questions and Answers

1 what is JDBC?

Ans: JDBC is a layer of abstraction that allows users to choose between databases. JDBC allows you to write database applications in Java without having to concern yourself with the underlying details of a particular database.

2 How many types of JDBC Drivers are present and what are they?

Ans: There are 4 types of JDBC Drivers Type 1: JDBC-ODBC Bridge Driver Type 2: Native API Partly Java Driver Type 3: Network protocol Driver Type 4: JDBC Net pure Java Driver

3 Explain the role of Driver in JDBC?

Ans: The JDBC Driver provides vendor-specific implementations of the abstract classes provided by the JDBC API. Each vendor’s driver must provide implementations of the java.sql.Connection, Statement, PreparedStatement, Callable Statement, ResultSet and Driver.

4 Is java.sql.Driver a class or an Interface?

Ans: It’s an interface.

5 Is java.sql.DriverManager a class or an Interface?

Ans: It’s a class. This class provides the static get Connection method, through which the database connection is obtained.

6 Is java.sql.Connection a class or an Interface?

Ans: java.sql.Connection is an interface. The implmentation is provided by the vendor specific Driver.

7 Is java.sql.Statement a class or an Interface

Ans: java.sql.Statement, java.sql.PreparedStatement and java.sql.Callable Statement are interfaces.

8 which interface do Prepared Statement extend?

Ans:java.sql.Statement

9 which interface do Callable Statement extend?

Ans: Callable Statement extends Prepared Statement.

Page 78: All Types of Interview Questions

10 what is the purpose Class.forName (“”) method?

Ans: The Class.forName (“”) method is used to load the driver.

11 Do you mean that Class.forName (“”) method can only be used to load a driver?

Ans: The Class.forName (“”) method can be used to load any class, not just thedatabase vendor driver class..

12 which statement throws ClassNotFoundException in SQL code block? and why?

Ans: Class.for Name (“”) method throws ClassNotFoundException. This exception is thrown when the JVM is not able to find the class in the class path.

13 what exception does Class.for Name () throw?

Ans: ClassNotFoundException.

14 what is the return type of Class.for Name () method?

Ans: java.lang.Class

15 Can an Interface be instantiated?

Ans: If not, justify and explain the following line of code:

Connection con = DriverManager.getConnection (“dsd”,”sds”,”adsd”);An interface cannot be instantiated. But reference can be made to a interface. When a reference is made to interface, the refered object should have implemented all the abstract methods of the interface. In the above mentioned line, DriverManager.getConnection method returns Connection Object with implementation for all abstract methods.

Servlet Interview Questions

1 what is a Servlet?

Ans: A Servlet is a server side java program which processes client requests and generates dynamic web content.

2 Explain the architechture of a Servlet?

Page 79: All Types of Interview Questions

Ans: The javax.servlet.Servlet interface is the core abstraction which has to be implemented by all servlets either directly or indirectly. Servlet run on a server side JVM ie the servlet container. Most servlets implement the interface by extending either javax.servlet.GenericServlet or javax.servlet.http.HTTPServlet.A single servlet object serves multiple requests using multithreading.

3 what is the difference between an Applet and a Servlet?

Ans: An Applet is a client side java program that runs within a Web browser on the client machine whereas a servlet is a server side component which runs on the web server. An applet can use the user interface classes like AWT or Swing while the servlet does not have a user interface. Servlet waits for client’s HTTP requests from a browser and generates a response that is displayed in the browser.

4 what is the difference between GenericServlet and HTTP Servlet?

Ans: GenericServlet is a generalised and protocol independent servlet which defined in javax.servlet package. Servlets extending GenericServlet should override service () method. Javax.servlet.http.HTTPServlet extends GenericServlet. HTTPServlet is http protocol specific ie it services only those requests thats coming through http. A subclass of HttpServlet must override at least one method of doGet (), doPost (), doPut(), do Delete (), init (), destroy () or getServletInfo ().

5 Explain life cycle of a Servlet?

Ans: On client’s initial request, Servlet Engine loads the servlet and invokes the init () methods to initialize the servlet. The servlet object then handles subsequent client requests by invoking the service () method. The server removes the servlet by calling destry () method.

6 what is the difference between doGet () and doPost ()?

Ans: doGET Method: Using get method we can able to pass 2K data from HTML All data we are passing to Server will be displayed in URL (request string).DoPOST Method: In this method we does not have any size limitation. All data passed to server will be hidden; User cannot able to see this info on the browser.

7 what is the difference between ServletConfig and ServletContext?

Ans: ServletConfig is a servlet configuration object used by a servlet container to pass information to a servlet during initialization. All of its initialization parameters can only be set in deployment descriptor. The ServletConfig parameters are specified for a particular servlet and are unknown to other servlets.The ServletContext object is contained within the ServletConfig object, which the Web server provides the servlet when the servlet is initialized. ServletContext is an interface which defines a set of methods which the servlet uses to interact with its servlet container. ServletContext is common to all servlets within the same web application. Hence, servlets use ServletContext to share context information.

8 what is the difference between using get Session (true) and get Session (false) methods?

Ans: get Session (true) method will check whether already a session exists for the user. If a session is existing, it will return the same session object, Otherwise it will create a new session object and return that object.

Get Session (false) method will check for the existence of a session. If a session exists, then it will return the reference of that session object, if not, it will return null.

9 what is meant by a Web Application?

Page 80: All Types of Interview Questions

Ans: A Web Application is a collection of servlets and content installed under a specific subset of the server’s URL namespace such as /catalog and possibly installed via a .war file.

10 what is a Server Side Include?

Ans: Server Side Include is a Web page with an embedded servlet tag. When the Web page is accessed by a browser, the web server pre-processes the Web page by replacing the servlet tag in the web page with the hyper text generated by that servlet.

11 what is Servlet Chaining?

Ans: Servlet Chaining is a method where the output of one servlet is piped into a second servlet. The output of the second servlet could be piped into a third servlet, and so on. The last servlet in the chain returns the output to the Web browser.

12 How do you find out what client machine is making a request to your servlet?

Ans: The ServletRequest class has functions for finding out the IP address or host name of the client machine. GetRemoteAddr () gets the IP address of the client machine and getRemoteHost () gets the host name of the client machine.

13 what is the structure of the HTTP response?

Ans: The response can have 3 parts:

1) Status Code – describes the status of the response. For example, it could indicate that the request was successful, or that the request failed because the resource was not available. If your servlet does not return a status code, the success status code,HttpServletResponse.SC_OK, is returned by default.

2) HTTP Headers – contains more information about the response. For example, the header could specify the method used to compress the response body.

3) Body – contents of the response. The body could contain HTML code, an image, etc…

14 what is a cookie?

Ans: A cookie is a bit of information that the Web server sends to the browser which then saves the cookie to a file. The browser sends the cookie back to the same server in every request that it makes. Cookies are often used to keep track of sessions.

15 which code line must be set before any of the lines that use the Print Writer?

Ans: setContentType () method must be set

16 Which protocol will be used by browser and servlet to communicate?

Ans: HTTP

17 Can we use the constructor, instead of init(), to initialize servlet?

Ans: Yes, of course you can use the constructor instead of init(). There’s nothing to stop you. But you shouldn’t. The original reason for init() was that ancient versions of

Page 81: All Types of Interview Questions

Java couldn’t dynamically invoke constructors with arguments, so there was no way to give the constructur a ServletConfig. That no longer applies, but servlet containers still will only call your no-arg constructor. So you won’t have access to a ServletConfig or ServletContext.

18 How can a servlet refresh automatically if some new data has entered the database?

Ans: You can use a client-side Refresh or Server Push

19 what is the Max amount of information that can be saved in a Session Object?

Ans: As such there is no limit on the amount of information that can be saved in a Session Object. Only the RAM available on the server machine is the limitation. The only limit is the Session ID length (Identifier), which should not exceed more than 4K. If the data to be store is very huge, then it’s preferred to save it to a temporary file onto hard disk, rather than saving it in session. Internally if the amount of data being saved in Session exceeds the predefined limit, most of the servers write it to a temporary cache on hard disk.

20 what is HTTP Tunneling?

Ans: HTTP tunneling is used to encapsulate other protocols within the HTTP or HTTPS protocols. Normally the intra-network of an organization is blocked by a firewall and the network is exposed to the outer world only through a specific web server port that listens for only HTTP requests. To use any other protocol, that by passes the firewall, the protocol is embedded in HTTP and sent as Http Request. The masking of other protocol requests as http requests is HTTP Tunneling.

JSP Interview Questions

1 Briefly explain about Java Server Pages technology?

Ans: JavaServer Pages (JSP) technology provides a simplified, fast way to create web pages that display dynamically-generated content. The JSP specification, developed through an industry-wide initiative led by Sun Microsystems, defines the interaction between the server and the JSP page, and describes the format and syntax of the page.

2 what is a JSP Page?

Ans: A JSP page is a text document that contains two types of text: static data, which can be expressed in any text-based format (such as HTML, WML, XML, etc), and JSP elements, which construct dynamic content.JSP is a technology that lets you mix static content with dynamically-generated content.

3 why do I need JSP technology if I already have servlets?

Ans: JSP pages are compiled into servlets, so theoretically you could write servlets to support your web-based applications. However, JSP technology was designed to simplify the process of creating pages by separating web presentation from web content. In many applications, the

Page 82: All Types of Interview Questions

response sent to the client is a combination of template data and dynamically-generated data. In this situation, it is much easier to work with JSP pages than to do everything with servlets.

4 How are the JSP requests handled?

Ans: The following sequence of events happens on arrival of jsp request:a. Browser requests a page with .jsp file extension in web server.b. Web server reads the request.c. Using jsp compiler, webserver converts the jsp into a servlet class that implement the javax.servletjsp.jsp page interface. The jsp file compiles only when the page is first requested or when the jsp file has been changed.e. The response is sent to the client by the generated servlet.

5 what are the advantages of JSP?

Ans: The following are the advantages of using JSP:

a. JSP pages easily combine static templates, including HTML or XML fragments, with code that generates dynamic content.b. JSP pages are compiled dynamically into servlets when requested, so page authors can easily make updates to presentation code. JSP pages can also be precompiled if desired.c. JSP tags for invoking JavaBeans components manage these components completely, shielding the page author from the complexity of application logic.d. Developers can offer customized JSP tag libraries that page authors access using an XML-like syntax.e. Web authors can change and edit the fixed template portions of pages without affecting the application logic. Similarly, developers can make logic changes at the component level without editing the individual pages that use the logic.

6 How is a JSP page invoked and compiled?

Ans: Pages built using JSP technology are typically implemented using a translation phase that is performed once, the first time the page is called. The page is compiled into a Java Servlet class and remains in server memory, so subsequent calls to the page have very fast response times.

7 what are Directives?

Ans: Directives are instructions that are processed by the JSP engine when the page is compiled to a servlet. Directives are used to set page-level instructions, insert data from external files, and specify custom tag libraries.

8 what are the different types of directives available in JSP?

Ans: The following are the different types of directives:

Page 83: All Types of Interview Questions

a. include directive : used to include a file and merges the content of the file with the current pageb. page directive : used to define page specific attributes like scripting language, error page, buffer, thread safety, etcc. taglib : used to declare a custom tag library which is used in the page.

9 what are JSP actions?

Ans: JSP actions are executed when a JSP page is requested. Actions are inserted in the jsp page using XML syntax to control the behavior of the servlet engine. Using action, we can dynamically insert a file, reuse bean components, forward the user to another page, or generate HTML for the Java plugin. Some of the available actions are as follows:<jsp: include> – include a file at the time the page is requested.<jsp: useBean> – find or instantiate a JavaBean.<jsp: setProperty> – set the property of a JavaBean.<jsp: getProperty> – insert the property of a JavaBean into the output.<jsp: forward> – forward the requester to a new page.<jsp: plugin> – generate browser-specific code that makes an OBJECT or EMBED tag for the Java plugin.

10 what are Script lets?

Ans: Script lets are blocks of programming language code (usually java) embedded within a JSP page. Scriptlet code is inserted into the servlet generated from the page. Scriptlet code is defined between <% and %>

11 what are Decalarations?

Ans: Declarations are similar to variable declarations in Java. Variables are defined for subsequent use in expressions or script lets.

12 How to declare instance or global variables in jsp?

Ans: Instance variables should be declared inside the declaration part. The variables declared with JSP declaration element will be shared by all requests to the jsp page.

13 what are Expressions?

Ans: Expressions are variables or constants that are inserted into the data returned by the web server.

14 what is meant by implicit objects? And what are they?

Ans: Implicit objects are those objects which are available by default. These objects are instances of classes defined by the JSP specification. These objects could be used within the jsp page without being declared.

Page 84: All Types of Interview Questions

The following are the implicit jsp objects:1. application2. Page3. Request4. Response5. Session6. Exception7. Out8. Config9. Page Context

15 How do I use Java Beans components (beans) from a JSP page?

Ans: The JSP specification includes standard tags for bean use and manipulation. The <jsp: useBean> tag creates an instance of a specific JavaBean class. If the instance already exists, it is retrieved. Otherwise, a new instance of the bean is created. The <jsp: setProperty> and <jsp: getProperty> tags let you manipulate properties of a specific bean.

16 what is the difference between <jsp: include> and <%@include :>

Ans: Both are used to insert files into a JSP page.<%@include :> is a directive which statically inserts the file at the time the JSP page is translated into a servlet.<jsp: include> is an action which dynamically inserts the file at the time the page is requested.

17 what is the difference between forward and send Redirect?

Ans: Both requestDispatcher.forward () and response.sendRedirect () is used to redirect to new url.Forward is an internal redirection of user request within the web container to a new URL without the knowledge of the user (browser). The request object and the http headers remain intact. send Redirect is normally an external redirection of user request outside the web container. send Redirect sends response header back to the browser with the new URL. The browser sends the request to the new URL with fresh http headers. send Redirect is slower than forward because it involves extra server call.

18 Can I create XML pages using JSP technology?

Ans: Yes, the JSP specification does support creation of XML documents. For simple XML generation, the XML tags may be included as static template portions of the JSP page. Dynamic generation of XML tags occurs through bean components or custom tags that generate XML output.

19 How is Java Server Pages different from Active Server Pages?

Ans: JSP is a community driven specification whereas ASP is a similar proprietary technology from Microsoft. In JSP, the dynamic part is written in Java, not Visual Basic or other MS-

Page 85: All Types of Interview Questions

specific language. JSP is portable to other operating systems and non-Microsoft Web servers whereas it is not possible with ASP

20 Can’t JavaScript be used to generate dynamic content rather than JSP?

Ans: JavaScript can be used to generate dynamic content on the client browser. But it can handle only handles situations where the dynamic information is based on the client’s environment. It will not able to harness server side information directly.

EJB Interview Questions

1 what are Enterprise Java Beans?

Ans: Enterprise Java Beans (EJB) is a specification which defines a component architecture for developing distributed systems. Applications written using the Enterprise JavaBeans architecture are resusable, scalable, transactional, and secure. Enterprise Java Bean’s allow the developer to only focus on implementing the business logic of the application.

2 what is a finder method?

Ans: A method defined in the home interface and invoked by a client to locate an entity bean

3 How many types of Enterprise beans are there and what are they?

Ans: There are 3 types Ebb’s and they are:1. Entity Bean’s2. Session Bean’s3. Message Driven Bean’s (MDB’s)

4 How many types of Entity beans are there and what are they?

Ans: There are 2 types Entity bean’s and they are:1. Container Managed Persistence (CMP) Entity Bean’s2. Bean Managed Persistence (BMP) Entity Bean’s

5 How many types of Session beans are there and what are they?

Ans: There are 2 types Session beans and they are:1. State full Session Bean’s2. Stateless Session Bean’s

6 How many types of MDB’s are there and what are they?

Ans: There are no different kinds of Message driven beans.

Page 86: All Types of Interview Questions

7 How many java files should a developer code to develop a session bean?

Ans: 3 java files has to be provided by the developer. They are:1) an Home Interface2) a Remote Interface3) And a Session Bean implementation class.

8 Explain the role of Home Interface.?

Ans: Home interface contains factory methods for locating, creating and removing instances of EJB’s.

9 Explain the role of Remote Interface.?

Ans: Remote interface defines the business methods callable by a client. All methods defined in the remote interface must throw Remote Exception.

10 what is the need for a separate Home interface and Remote Interface. Can’t they be defined in one interface?

Ans: EJB doesn’t allow the client to directly communicate with an enterprise bean. The client has to use home and remote interfaces for any communication with the bean.The Home Interface is for communicating with the container for bean’s life cycle operations like creating, locating, removing one or more beans. While the remote interface is used for remotely accessing the business methods.

11 what are callback methods?

Ans: Callback methods are bean’s methods, which are called by the container. These are called to notify the bean, of it’s life cycle events.

12 How will you make a session bean as stateful or stateless?

Ans: We have to specify the it in the deployment descriptor (ejb-jar.xml) using <session-type> tag.

13 what is meant by Activation?

Ans: The process of transferring an enterprise bean from secondary storage to memory.

14 what is meant by Passivation?

Ans: The process of transferring an enterprise bean from memory to secondary storage.

15 hat is a re-entrant Entity Bean?

Page 87: All Types of Interview Questions

Ans: An re-entrant Entity Bean is one that can handle multiple simultaneous,interleaved, or nested invocations which will not interfere with each other.

16 Why are ejbActivate () and ejbPassivate () included for stateless session bean even though they are never required as it is a no conversational bean?

Ans: To have a consistent interface, so that there is no different interface that you need to implement for Stateful Session Bean and Stateless Session Bean. Both Stateless and Stateful Session Bean implement javax.ejb.SessionBean and this would not be possible if stateless session bean is to remove ejbActivate and ejbPassivate from the interface.

17 what is an EJB Context?

Ans: EJBContext is an object that allows an enterprise bean to invoke services provided by the container and to obtain the information about the caller of a client-invoked method.

18 Explain the role of EJB Container?

Ans: EJB Container implements the EJB component contract of the J2EE architecture. It provides a runtime environment for enterprise beans that includes security, concurrency, life cycle management, transactions, deployment, naming, and other services. An EJB Container is provided by an EJB Server.

19 what are Entity Bean’s?

Ans: Entity Bean is an enterprise bean that represents persistent data maintained in a atabase. An entity bean can manage its own persistence or can delegate this function to its container. An entity bean is identified by a primary key. If the container in which an entity bean is hosted crashes, the entity bean, its primary key, and any remote references survive the crash.

20 what is a Primary Key?

Ans: Primary Key is an object that uniquely identifies an entity bean within a home.

RMI Interview Questions

1 what is RMI?

Ans: Remote Method Invocation (RMI) is the process of activating a method on a remotely running object. RMI offers location transparency in the sense that it gives the feel that a method is executed on a locally running object.

Page 88: All Types of Interview Questions

2 what is the basic principle of RMI architecture?

Ans:The RMI architecture is based on one important principle: the definition of behavior and the implementation of that behavior are separate concepts. RMI allows the code that defines the behavior and the code that implements the behavior to remain separate and to run on separate JVMs.

3 what are the layers of RMI Architecture?

Ans: The RMI is built on three layers.a. Stub and Skeleton layer This layer lies just beneath the view of the developer. This layer intercepts method calls made by the client to the interface reference variable and redirects these calls to a remote RMI service.b. Remote Reference Layer. This layer understands how to interpret and manage references made from clients to the remote service objects. The connection is a one-to-one (unicast) link.c. Transport layer This layer is based on TCP/IP connections between machines in a network. It provides basic connectivity, as well as some firewall penetration strategies.

4 what is the role of Remote Interface in RMI?

Ans: The Remote interface serves to identify interfaces whose methods may be invoked from a non-local virtual machine. Any object that is a remote object must directly or indirectly implement this interface. Methods that are to be invoked remotely must be identified in Remote Interface. All Remote methods should throw Remote Exception.

5 what is the role java.rmi.Naming Class?

Ans: The Naming class provides methods for storing and obtaining references to remote objects in the remote object registry.

6 what is the default port used by RMI Registry?

Ans: 1099

7 what is meant by binding in RMI?

Ans: Binding is a process of associating or registering a name for a remote object that can be used at a later time to look up that remote object. A remote object can be associated with a name using the Naming class’s bind or rebind methods.s

8 what is the difference between using bind () and rebind () methods of Naming Class?

Ans: The bind method (String name) binds the specified name to a remote object while rebind (String name) method rebinds the specified name to a new remote object; any existing binding for the name is replaced.

Page 89: All Types of Interview Questions

9 When is Already Bound Exception thrown and by which method?

Ans: AlreadyBoundException is thrown by bind (String name) method when a remote object is already registered with the registry with the same name.Note: rebind method doesn’t throw AlreadyBoundException because it replaces the existing binding with same name.

10 How to get all the registered objects in a registry?

Ans: Using list method of Naming Class.

11 Can a class implementing a Remote interface have non remote methods?

Ans: Yes. Those methods behave as normal java methods operating within the JVM.

12 what is the protocol used by RMI?

Ans: JRMP (java remote method protocol)

13 what is the use of  Uni cast Remote Object in RMI?

Ans: The UnicastRemoteObject class provides support for point-to-point active object references using TCP streams. Objects that require remote behavior should extend UnicastRemoteObject.

14 what does the export Object of UnicastRemoteObject do?

Ans: Exports the remote object to make it available to receive incoming calls, using the particular supplied port. If port not specified receives calls from any anonymous port.

15 what is Portable Remote Object.narrow () method and what is used for?

Ans: Java RMI-IIOP provides a mechanism to narrow the the Object you have received from from your lookup, to the appropriate type. This is done through the java x.rmi. PortableRemoteObject class and, more specifically, using the narrow() method.

16 In a RMI Client Program, what are the excpetions which might have to handle?

Ans: a. MalFormedURLExceptionb. NotBoundExceptionc. RemoteException

JMS Interview Questions and Answers

Page 90: All Types of Interview Questions

1 what is messaging?

Ans: Messaging is a method of communication between software components or applications.

2 what is JMS?

Ans: Java Message Service is a Java API that allows applications to create, send, receive, and read messages.

3 Is JMS a specification or a product?

Ans: JMS is a specification.

4 what are the features of JMS?

Ans: The following are the important features of JMS:a. Asynchronous Processing.b. Store and forwarding.c. Guaranteed delivery.d. Provides location transparency.e. Service based Architecture.

5 what are two messaging models or messaging domains?

Ans: a. Point-to-Point Messaging domain.b. Publish/Subscribe Messaging domain

6 Explain Point-to-Point Messaging model.?

Ans: A point-to-point (PTP) product or application is built around the concept of message queues, senders, and receivers. Each message is addressed to a specific queue, and receiving clients extract messages from the queue(s) established to hold their messages. Queues retain all messages sent to them until the messages are consumed or until the messages expire.

Point-to-Point Messaging has the following characteristics:a. Each Message has only one consumer.b. The receiver can fetch the message whether or not it was running when the client sent the message.c. The receiver acknowledges the successful processing of a message.

7Explain Pub/Sub Messaging model.?

Ans: In a publish/subscribe (pub/sub) product or application; clients address messages  to a topic. Publishers and subscribers are generally anonymous and may dynamically publish or subscribe to the content hierarchy. The system takes care of distributing the messages arriving from a

Page 91: All Types of Interview Questions

topic’s multiple publishers to its multiple subscribers. Topics retain messages only as long as it takes to distribute them to current subscribers.

Pub/sub messaging has the following characteristics:a. Each message may have multiple consumers.b. Publishers and subscribers have a timing dependency. A client that subscribes to a topic can consume only messages published after the client has created a subscription, and the subscriber must continue to be active in order for it to consume messages.

8 what are the two types of Message Consumption?

Ans: a. Synchronous Consumption: A subscriber or a receiver explicitly fetches the message from the destination by calling the receive method. The receive method can block until a message arrives or can time out if a message does not arrive within a specified time limit.

b. Asynchronous Consumption: A client can register a message listener with a consumer. A message listener is similar to an event listener. Whenever a message arrives at the destination, the JMS provider delivers the message by calling the listener’s on Message method, which acts on the contents of the message.

9 what is a connection factory?

Ans: A connection factory is the object a client uses to create a connection with a provider. A connection factory encapsulates a set of connection configuration arameters that has been defined by an administrator. Each connection factory is an instance of either the QueueConnectionFactory or the TopicConnectionFactory interface.

10 what is a destination?

Ans: A destination is the object a client uses to specify the target of messages it produces and the source of messages it consumes. In the PTP messaging domain, destinations are called queues and in the pub/sub messaging domain, destinations are called topics.

11 what is a message listener?

Ans: A message listener is an object that acts as an asynchronous event handler for messages. This object implements the Message Listener interface, which contains one method, on Message. In the on Message method, you define the actions to be taken when a message arrives.

12 what is a message selector?

Ans: Message selector filters the messages received by the consumer based on criteria. Message selectors assign the work of filtering messages to the JMS provider rather than to the application. A message selector is a String that contains an expression. The syntax of the expression is based on a subset of the SQL92 conditional expression syntax. The message consumer then receives only messages whose headers and properties match the selector.

Page 92: All Types of Interview Questions

13 Can a message selector select messages on the basis of the content of the message body?

Ans: No. The message selection is only based on message header and messageproperties.

14 what are the parts of a JMS message?

Ans: A JMS message has three parts:a. headerb. Properties (optional)c. body (optional)

15 what is a message header?

Ans: A JMS message header contains a number of predefined fields that contain values that both clients and providers use to identify and to route messages. Each header field has associated setter and getter methods, which are documented in the description of the Message interface.

16 what are message properties?

Ans: Message properties are additional user defined properties other than those that are defined in the header.

17 what is the root exception of JMS?

Ans: JMSException is the root class for exceptions thrown by JMS API methods.

18  Name few subclasses of JMS Exception?

Ans: a. Message Format Exceptionb. Message EOF Exceptionc. Invalid Client ID Exceptiond. Invalid Destination Exceptione. Invalid Selector Exception

19 what is a Message?

Ans: A message is a package of business data that is sent from one application to another over the network. The message should be self-describing in that it should contain all the necessary context to allow the recipients to carry out their work independently.

20 How many types are there and what are they?

Ans: There are 5 types of Messages. They are:

Page 93: All Types of Interview Questions

a. Text Message : A java.lang.String object (for example, the contents of an Extensible Markup Language file).

b. Map Message: A set of name/value pairs, with names as String objects and values as primitive types in the Java programming language. The entries can be accessed sequentially by enumerator or randomly by name. The order of the entries is undefined.

c. Bytes Message: A stream of uninterrupted bytes. This message type is for literally encoding a body to match an existing message format.

d. Stream Message: A stream of primitive values in the Java programming language, filled and read sequentially.

e. Object Message: A Serializable object in the Java programming language.

Core Java and Advanced Java Interview Questions

1 What is a transient variable?

Ans: A transient variable is a variable that may not be serialized.

2 Which containers use a border Layout as their default layout?

Ans: The window, Frame and Dialog classes use a border layout as their default layout.

3 Why do threads block on I/O?

Ans: Threads block on I/O (that is enters the waiting state) so that other threads may execute while the I/O Operation is performed.

4 How are Observer and Observable used?

Ans: Objects that subclass the Observable class maintain a list of observers. 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. The Observer interface is implemented by objects that observe Observable objects.

5 What is synchronization and why is it important?

Ans: With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is possible for one thread to

Page 94: All Types of Interview Questions

modify a shared object while another thread is in the process of using or updating that object’s value. This often leads to significant errors.

6 Can a lock be acquired on a class?

Ans: Yes, a lock can be acquired on a class. This lock is acquired on the class’s Class object.

7 What’s new with the stop (), suspend () and resume () methods in JDK 1.2?

Ans: The stop (), suspend () and resume () methods have been deprecated in JDK 1.2.

8 Is null a keyword?

Ans: The null value is not a keyword.

9 What is the preferred size of a component?

Ans: The preferred size of a component is the minimum component size that will allow the component to display normally.

10 What method is used to specify a container’s layout?

Ans: The set Layout () method is used to specify a container’s layout.

11 Which containers use a Flow Layout as their default layout?

Ans: The Panel and Applet classes use the Flow Layout as their default layout.

12 What state does a thread enter when it terminates its processing?

Ans: When a thread terminates its processing, it enters the dead state.

13 What is the Collections API?

Ans: The Collections API is a set of classes and interfaces that support operations on collections of objects.

14 Which characters may be used as the second character of an identifier, but not as the first character of an identifier?

Ans: The digits 0 through 9 may not be used as the first character of an identifier but they may be used after the first character of an identifier.

15 What is the List interface?

Ans: The List interface provides support for ordered collections of objects.

Page 95: All Types of Interview Questions

16 How does Java handle integer overflows and underflow?

Ans: It uses those low order bytes of the result that can fit into the size of the type allowed by the operation.

17 What is the Vector class?

Ans: The Vector class provides the capability to implement a grow able array of objects

18  What modifiers may be used with an inner class that is a member of an outer class?

Ans: A (non-local) inner class may be declared as public, protected, private, static, final, or abstract.

19 What is an Iterator interface?

Ans: The Iterator interface is used to step through the elements of a Collection.

20 What is the difference between the >> and >>> operators?

Ans: The >> operator carries the sign bit when shifting right. The >>> zero-fills bits that have been shifted out.

SPORTS QUIZ

1. Who won ICC Award for women’s player of the year 2009? Diana Eduljee Clare Taylor

Shanta Rangaswami

Anjum Chopra

2. Who won ICC Award for cricketer of the year 2009? Daryl Tuffey Graeme Smith

Mitchell Johnson

Eoin Morgan

3. Who won ICC Award for ODI player of the year 2009? Andrew Flintoff Virender Sehwag

Page 96: All Types of Interview Questions

Sachin Tendulkar

Mahendra Singh Dhoni

4. Who won ICC Award for T20 international performance of the year 2009? Tilakaratne Dilshan Andrew Strauss

Christopher Gayle

Yuvraj Singh

5. Who won ICC Award for emerging player of the year 2009? Brett Lee Peter Siddle

James Anderson

Paul Collingwood

6. Who was named by ICC as captain of the World ODI team of the year 2009 and captain of the World Test team of the year 2009?

Ricky Ponting Anil Kumble

Daniel Vettori

Mahendra Singh Dhoni

7. Who won ICC Award for umpire of the year 2009? Richard Baird Simon Tauffel

David Shepherd

Aleem Dar

8. Who won ICC Award for Test player of the year 2009? Stephen Fleming Gautam Gambhir

Younis Khan

Rahul Dravid

9. Who won ICC Award for the spirit of cricket? India Australia

New Zealand

Page 97: All Types of Interview Questions

West Indies

10. Who won ICC Award for associate and affiliate player of the year 2009? Shane Watson Jesse Ryder

Luke Wright

William Porterfield

1. What was India’s final place in Hockey World Cup 2006? 12 11

10

6

2. Who won bronze medal in Hockey World Cup 2006? Spain England

Ireland

Poland

3. Who won Hockey World Cup 2006? Japan Canada

Italy

Germany

4. By how many goals Pakistan defeated Japan in a league match in Hockey World Cup 2006?

2-0 2-1

3-1

4-0

5. With which team India’s match ended in a 1-1 draw in Hockey World Cup 2006? Mozambique Cuba

Page 98: All Types of Interview Questions

Angloa

South Africa

6. Who won Fair Play Trophy in Hockey World Cup 2006? New Zealand Belgium

South Africa

South Korea

7. Who were runners-up in Hockey World Cup 2006? Holland Australia

Malaysia

Pakistan

8. When was the final of Hockey World Cup 2006? 1 October 2006 15 March 2006

17 September 2006

24 June 2006

9. By how many goals Germany defeated India in a league match in Hockey World Cup 2006?

6-4 1-0

3-2

4-2

10. Where was Hockey World Cup 2006 held? Munchengladbach Brussels

Vienna

Rotterdam

Page 99: All Types of Interview Questions