Your Ad Here
Showing posts with label free interview questions. Show all posts
Showing posts with label free interview questions. Show all posts

Saturday, January 3, 2009

Recent - JAVA Interview Questions & Answers

Q : What is the difference between Java platform and other platforms?
A : The Java platform differs from most other platforms in that it's a software-only platform that runs on top of other hardware-based platforms.

The Java platform has two components:

1. The Java Virtual Machine (Java VM)

2. The Java Application Programming Interface (Java API)

Q : What is Java Virtual Machine?

A : The Java Virtual Machine is a software that can be ported onto the various hardware-based platforms.

Q : What is the package? Define with an example?

A : A package is a grouping of related types providing access protection and name space management. Note that types refers to classes, interfaces, enumerations, and annotation types. Enumerations and annotation types are special kinds of classes and interfaces, respectively, so types are often referred to in this lesson simply as classes and interfaces.

Package is a directory of related classes and interfaces.
Eg: java.lang.*

Here java is a directory,lang stands for language & it is a sub directory, * indicates collection of related classes & interfaces

Q : What is the difference between the interface and abstract class?
A : An abstract class may contain code in method bodies, which is not allowed in an interface. With abstract classes, you have to inherit your class from it and Java does not allow multiple inheritance. On the other hand, you can implement multiple interfaces in your class.

Q : What is the thread?
A : A thread is an independent path of execution in a system.

Q :What is the multi-threading?
A: Multi-threading means various threads that runs in a system.

Q : What is the synchronization ? why is it important in Java Programming?
A : With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources. Without synchronization, it is an possible for one thread to modify a shared object while another thread is in the process of using or updating that object’s value. This often causes dirty data and leads to significant errors.

Q : What is the purpose of Runtime class in Java Programming?
A :The purpose of Runtime class is to provide access to the Java runtime system in Java Programming.

Q :Describe difference between a static and a non-static inner class in Java Programming?
A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any other object instances.

Q : Name the primitive Java types?
A : The primitive types are,

byte, char, short, int, long, float, double, and boolean.

Q : What is the casting in Java Programming?
A : There are two types of casting, casting between primitive numeric types and casting between object references.
Casting between numeric types is used to convert larger values, such as double values, to smaller values, such as byte values. Casting between object references is used to refer the object by a compatible class, interface, or array type reference.

Q : What are the Encapsulation, Inheritance and Polymorphism?
A : Encapsulation is the mechanism that binds together code and data it manipulates and keeps both safe from outside interference and misuse.
Inheritance is the process by which one object acquires the properties of another object. Polymorphism is the feature that allows one interface to be used for general class actions.

Q : What is the difference between constructor and method?
A : Constructor will be automatically invoked when an object is created where as the method has to be called explicitly.

Q: What is a UNICODE?-
A : A Unicode is used for internal representation of characters and strings and it uses 16 bits to represent each other.

Q : What is a abstract class?
A :A abstract class is a class designed with implementation gaps for subclasses to fill in and is deliberately incomplete.

Q : What is daemon thread ? which the method is used to create the daemon thread?-
A: Daemon thread is a low priority thread which runs intermittently in the back ground doing the garbage collection operation for the java runtime system.

SetDaemon method is used to create a daemon thread.

Q: What are the wrapper classes?
A : The Wrapper classes are classes that allow primitive types to be accessed as objects.

Q : What is the difference between applet and a servlet?
A : Servlets are to servers what applets are to browsers.
Applets must have graphical user interfaces whereas servlets have no graphical user interfaces.

Q :What are the cookies ?
A : Cookies are a mechanism that a servlet uses to have a client hold a small amount of state-information associated with the user.

Q :What is Java Bean?
A : Java Bean is a software component that has been designed to be reusable in a variety of different environments.

Recent HTML Interview Questions & Answers

Q : What’s the difference between the HTML form methods GET and POST?
A : The method parameter specifies which method the client is using to send information to the WEB server. The method determines which parameter you will search the CGI request data in:
* POST - post_args
* GET - http_search_args

Q : What is a tag?
A : In HTML, a tag tells the browser what to do. When you write an HTML page, you enter tags for many reasons -- to change the appearance of text, to show a graphic, or to make a link to one page to another page.

Q : What are meta tags and why it is used?
A: Html tag in the header section of a web page, intended to offer content to search engines. Among them are the keyword and description tags, but these days are most true search engines de-emphasize or completely ignore META tags. ...

Q : What are the differences between DIV and SPAN?
A : DIV is used to select a block of text so that one can apply styles to it. SPAN is used to select inline text and let users to apply styles to it. The main difference between DIV and SPAN is SPAN does not do formatting by itself. Also the DIV tag is used as a paragraph break as it creates a logical division of the document in which it is applied. This is in contrast to the SPAN as SPAN simply dos the functionality of applying the style and alignment whatever was specified in it. DIV has ALIGN attribute in it which is not present in case of SPAN. Thus DIV is used in cases where one wants to apply styles to a block of text. But there may be situations in which that the there might not be clear well structured block of text to work with. In those cases one can do opt to apply SPAN which is used to apply styles inline. That is in other words DIV is generally used for block of text and SPAN is generally used for words or sentences.

Q : How do you change the title of a framed document?
A : The title displayed is the title of the frameset document rather than the titles of any of the pages within frames. To change the title displayed, a link to a new frameset document using
TARGET="_top" (replacing the entire frameset).

Q : How do you link to a location in the middle of an HTML document?
A : First, label the destination of the link. The old way to label the destination of the link was with an anchor using the NAME attribute.
For example:

Section 2: Web Page



The modern way to the label destination of the link is with an ID attribute.
For example:

Section 2: Web page



Second, link to the labeled destination. The URL is the URL of the document, with "#" and the value of the NAME or ID attribute appended. Continuing the above examples, elsewhere in the same document you could use:
go to Section 2

Q : How do you remove the border around frames?
A : Removing the border around frames involves both not drawing the frame borders and eliminating the space between the frames. The most widely supported way to display borderless frames is FRAMESET ... BORDER=0 FRAMEBORDER=0 FRAMESPACING=0".
Note that these attributes are proprietary and not part of the HTML 4.01 specifications. (HTML 4.01 does define the FRAMEBORDER attribute for the FRAME element, but not for the FRAMESET element.) Also, removing the border around a frame makes it is difficult to resize it, as this border is also used in most GUIs to change the size of the frame.

Q : Explain in brief about the term CSS.
A : A stylesheet language is used to describe the presentation of a document written in a markup language. Cascading Style Sheets are a big breakthrough in Web design because they allow developers to control the style and layout of multiple Web pages all at once.

Q : What are the attributes that make up a DHTML?
A : DHTML is called as a Dynamic HTML. This is used to increase the interactive ability and the visual effect of the web pages which is loaded in the browser. The main technologies that are used in DHTML are namely:

HTML
JavaScript
CSS which is also called as Cascading Style Sheet
DOM also called as Document Object Model

Let see the DHTML namely briefly about

HTML:
This is also known as hyper text markup language. This is widely used in web pages. This along with JavaScript plays a vital role for enhancing the features of web pages. In other words the JavaScript is inside the HTML page and this is read by the browser as soon as the page gets loaded.

JavaScript:
JavaScript is the most popularly used scripting language for client-side. The use of JavaScript within the HTML page adds interactivity ability to web pages and this was introduced by Netscape.


DOM:
DOM is called as Document Object Model. This is platform and also language independent. This is used for dynamic access and updating of contents in documents


CSS:
CSS is called as Cascading Style Sheet. This is used to enhance the features of web pages like formatting styles say bold, font size and so on and there by increase the visual appearance of web pages. These are specified inside an HTML tag.

Q : Why is there extra space before or after the table?
A : This is often caused by invalid HTML syntax. Specifically, it is often caused by loose content within the table (i.e., content that is not inside a TD or TH element). There is no standard way to the handle loose content within a table. Some browsers display all loose content before or after the table. When the loose content contains only multiple line breaks or empty paragraphs, then these browsers will display all this empty space before or after the table itself.
The solution is to fix the HTML syntax errors. All content within a table must be within a TD or TH element.

Q : What’s the difference between jscript and javascript?
A : JScript & javascript are both scripting languages that facilitate
development of web pages. It is similar to javascript with subtle difference in objects & functions exposed. JScript is supported and shipped by Microsoft and may be work best only on IE where as Javascript was initiated by netscape and can do work across all browsers consistently

J2EE Interview questions & answers

Q : what is J2EE ?what is the features?
J2EE is java to enterprise edition. It is used to develop web applications

Q : Define Hash table?
Hash tables are good for doing a quick search on things.
For instance if we have an array full of data (say 100 items).If we known the position that a specific item is stored in an array, then we could quickly access it. For instance, we just happen to know that the item we want it is at position 3; I can apply:
myitem=myarray[3];
There are many different hash functions. Some hash functions will take an integer key and turn it into an index. A common one is used to the division method

Q : what is the difference between web server & application server ?
A : web server can have only the web container. But Application server can have web container as well as EJB container
Example of Application Server : JBOSS
Web Server : TOMCAT.

Q : What are the components of J2EE application?
A : A J2EE component is a self-contained functional software unit that is assembled into a J2EE application with its related classes and files and communicates with other components. The J2EE specification defines the following J2EE components:
Application clients and applets are client components.
Java Servlet and JavaServer PagesTM (JSPTM) technology components are web components.
Enterprise JavaBeansTM (EJBTM) components (enterprise beans) are business components.
Resource adapter components provided by EIS and tool vendors

Q : What is a J2EE component ?
A : A self-contained functional software unit supported by the container and configurable at deployment time. The J2EE specification defines the following J2EE components: Application clients and applets are components that run on the client. Java servlet and JavaServer Pages (JSP) technology components are Web components that run on the server. Enterprise JavaBeans (EJB) components (enterprise beans) are business components that run on the server. J2EE components are written in the Java programming language and are compiled in the same way as any program in the language. The difference between J2EE components and "standard" Java classes is that J2EE components are assembled into a J2EE application, verified to be well formed and in compliance with a J2EE specification, and deployed to production, where they are run and managed by the J2EE server or client container.

Q : What is "applet"?
A: A J2EE component that is a typically executes in a Web browser but can execute in a variety of other applications or devices that support the applet programming model.

Q : Difference between RMI and EJB?
A : EJB uses RMI technology.
We have to declare the middleware services needed by the EJB in a descriptor.
The Applet server will generate stubs for the same.

RMI : one has to write the middleware services. (txn mgmt, persitence.)

EJB cannot be invoked directly by the remote clients because there are not network enabled.
Location transparency.

Q : What is a web container?
A :Runtime environment for servlets and JSP
Manages lifecycle of instances
Supports HTTP

Q : What’s the difference between URL Connection instance and URL instance?

A : URL Connection instance represents a link for accessing or communicating with the resource at the location and a URL instance represents the location of a resource.

Q :What technologies are included in J2EE?

A :The primary technologies in J2EE are: Enterprise JavaBeansTM (EJBsTM), JavaServer PagesTM (JSPsTM), Java Servlets, the Java Naming and Directory InterfaceTM (JNDITM), the Java Transaction API (JTA), CORBA, and the JDBCTM data access API.

Q : What is XLink ?
A : The part of the XLL specification that is concerned with the specifying links between documents.

Q : What is XLL ?

A : The XML Link Language specification, consisting of XLink and XPointer.

Q : What is in-memory replication?
A : The process by which the contents in the memory of one physical m/c is replicated in all the m/c in the cluster is called in-memory replication.
Q : What is a JavaBeans component
A : A JavaBeans class that can be manipulated by tools and composed into the applications. A JavaBeans component must adhere to the certain property and event interface conventions.

Q : What is the J2EE module?
A : The J2EE module consists of one or more J2EE components.For the same container type and one component deployment descriptor of that type

Q : What is a Web resource ?
A static or dynamic object contained in a Web application that can be referenced by a Uniform Resource Locator URL.

Q : What is "application assembler"?
A : A person who combines J2EE components and modules into deployable application units.

Q : What are the four types of J2EE modules?
A : The four types of J2EE modules are
• Application client module
• Web module
• Enterprise JavaBeans module
• Resource adapter module

JMS Interview Questions & Answers

Q : What is JMS?
A : The Java Message Service is a Java API that allows applications to create and send, receive, and read messages. Designed by Sun and several partner companies, the JMS API defines a common set of interfaces and associated semantics that allow the programs written in the Java programming language to communicate with the other messaging implementations.

Q : What’s the difference between queue and topic?
A : A topic is typically used for one to many messaging i.e. it supports publish subscribe model of messaging. While queue is used for the one-to-one messaging i.e. it
supports Point to Point Messaging.

Q : What is an encryption options are there for sending messages through JMS?
A : Encryption is not handled by the JMS specification. It is left to the JMS provider to implement and provide encryption and decryption of messages. These days, Progress Software’s Sonic MQ is a leading the JMS provider and they have a robust encryption mechanism called Quality of Protection. They also provide an SSL-related feature, which is also has build in encryption.

Q :How does the Application server handle the JMS Connection?
• A : Application server is created the server session and stores them in a pool.
• Connection consumer uses the server session to put messages in the session of the JMS.
• Applications written by Application programmers creates the message listener.
• Server session is the one that spawns the JMS session.

Q : What is point-to-point messaging?
A : A point-to-point message passing is the sending application/client establishes a named message queue in the JMS broker/server and sends messages to this queue. The receiving client registers with the broker to receive the messages posted to this queue. There is a one-to-one relationship between the sending and receiving clients.

Q : What is the advantage of persistent message delivery compared to nonpersistent delivery?
A : If the JMS server experiences a failure, for example, a power outage, any message that it is holding in an primary storage potentially could be lost. With persistent storage, the JMS server is logs every message to secondary storage. (The logging occurs on the front end, that is, as part of handling the send operation from the message producing client.) The logged message is removed from secondary storage only after it has been successfully delivered to all the consuming clients.

Q : What is the difference between the Messaging and Mailing?
A: . Messaging is the way of communicating to the remote machines is using the Message Oriented Middlewares. Message Oriented Middlewares don’t use mailing internally for communication. They create their own channels for communication. Java Mailing is the set of APIs that primarily concerns with the sending of Mail messages through the standard mail protocols.

Q : What is a Stream Message ?
A : A Stream messages are a group of java primitives. It contains the some of convenient methods for reading the data. However the Stream Message prevents reading a long value as a short. This is so because the Stream Message also writes the type of information along with the value of the primitive type and enforces a set of strict conversion rules which actually prevents reading of one primitive type as another.

Q : What is the Role of the JMS Provider?
A : The role of the JMS provider is handles the security of the messages, data conversion and the client triggering. The JMS provider specifies the level of encryption and the security level of the message, the best data type for the non-JMS client.

Q What is the text message?
A : The text messages contains String messages (since being widely used, a separate messaging Type has been supported) . It is useful for exchanging textual data and complex character data like XML.

Q What is an object message ?
A : An Object message contains a group of serializeable java object. So it allows exchange of Java objects between applications. Sot both the applications must be Java applications

Q : What is Map message?
A : A Map message is contain the name of the value Pairs. The values can be of type primitives and its wrappers. The name is a string.

Q What is Byte Message ?
A Byte Messages contains a Stream of uninterrupted bytes. Byte Message contains an array of primitive bytes in it is payload. Thus it can be used for transfer of data between two applications in their native format which may not be compatible with other Message types. It is also to useful the where JMS is used purely as a transport between two systems and the message payload is opaque to the JMS client.

Q : What’s the difference between StreamMessage and BytesMessage?
A :The StreamMessage maintains a boundary between the different data types stored because it also stores the type information along with the value of the primitive being stored. BytesMessage stores the primitive data types by converting them to their byte representation. Thus the message is one the contiguous stream of bytes BytesMessage allows the data to be read using any type. Thus even if your payload contains a long value, you can invoke a method of to read a short and it will return you something. It will not give you a semantically correct data but the call will succeed in reading the first two bytes of data. This is strictly prohibited in the StreamMessage. It maintains the type information of the data being stored and enforces strict conversion rules on the data being read.

Q : How JMS is different from RPC?
A : In RPC the method is invoked the waits for the method to finish execution and return to the control back to the invoker. Thus it is completely synchronous in nature. While in the JMS the message sender just sends the message to the destination and continues it is the own processing. The sender does not wait for the receiver to respond. This is asynchronous behavior.

Q : What is main parts of JMS applications?
A :The main parts of JMS applications are:
ConnectionFactory and Destination
Session
Connection
MessageConsumer
MessageProducer
Message

Wednesday, December 31, 2008

JSP Interview Questions & Answers

Q : What is a JSP and what is it used for?
A : Java Server Pages is a platform independent presentation layer technology that comes with SUN s J2EE platform. JSPs are normal HTML pages are with Java code pieces embedded in them. JSP pages are saved to *.jsp files. A JSP compiler is used to in the background to generate a Servlet from the JSP page.

Q : What is JSP technology?
A : Java Server Page is a standard Java extension that is defined on top of the servlet Extensions. The goal of JSP is the simplified creation and management of dynamic Web pages. JSPs are secure, platform-independent, and the best of all, make use of Java as a server-side scripting language.

Q : How many JSP scripting elements ?
A : There are three JSP scripting language elements:
• Scriptlets
• Declarations
• Expressions

Q : What is the information needed to create a TCP Socket?

A : The Remote System’s IPAddress and Port Number.
The Local Systems IP Address and Port Number.

Q : What is difference between JSP 1.0 model and JSP 2.0 model?

A : The main difference between the JSP 1.0 and JSP 2.0 has feature in that by which we can create more syntax errors due to TLD.

Q :Diffrence betweeen a statis and dynamic include?

Dynamic include means files are included at run time.
If there is any change in source file it will reflected in JSP
Static include means files are included at compile time. After inclusion if there any change in source file it will not reflect that JSP.

Q : What’s the differences between JSP LifeCycle and Servlet LifeCycle?
A : In servlet we can implement init, service and destroy method but in JSP we do not have any implementation for that i.e JSP container is taking care of that implementation . Finally only translation phase is different i.e JSP converted into servlet.

Q : What is the difference between web server and application server?
A : Application server is EJB. It can communicate will both Web and Distributed Architecture. Application server is a Component Architecture
Web server can not communicate with Component Architecture or Distributed Architecture. It consists of Servlets and JSP pages.

Q : How to Upload a textfile from JSP to Servlet ?
A . You must use this tag for Remember form tag must contain the following attribute

Enctype ="multipart/form-data" then only it will validate file upload.

Q : What’s the difference between JSP forward and servlet forward methods?

A : JSP forward forwards the control to another resource available in the same web application on the same container. where as a Servlet forward forwards the control to another resource available in the same web application or different web application on the same container.

Q : How to call EJB from JSP.?
We need to write a JavaBean which implements the code for the EJB client. This is JavaBean can interact with the JSP using useBean JSP action.

Q : What is the difference between jsp include and directive include?
A : <%@ include> : Used to include dynamic content or static content during runtime
Used to include static resources during translation time. :

Q : How does JSP handle runtime exceptions?
A: Using the error Page attribute of page directive and also we need to specify the error page isErrorPage=true if the current page is intended to URL redirecting of a JSP.

Q : What are the implicit objects?
A : Implicit objects are objects that are created by the web container and contain the information related to a particular request, page, or application. They are:
• Request
• session
• response
• pageContext
• application
• out
• exception
• config
• page

Q : What is an Expression?

A : An expression is a tag contains a scripting language expression that is evaluated, converted to a String, and inserted where the expression appears in the JSP file. Because the value of an expression is converted to a String, you can use an expression within text in a JSP file. Like
<%= someexpression %>
<%= (new java.util.Date()).toLocaleString() %> You won’t use the semicolon to end an expression.

Recent ASP Interview Questions & Answers

Q : What’s the difference between client-side script and server-side script?
A : Scripts executed only by the browser without contacting the server is called client-side script. It is browser dependent. The scripting code is a visible to the user and hence not secure. Scripts are executed by the web server and processed by the server is called server-side script.

Q : What is Session Object?
A : Session object is stored in the information about a User’s session. Gives a notification when a user session begins or ends.

Q : What is the Server-Side includes?
Server side includes provides the extra information by which it makes the site easier to manage. It can include the text files using the #include statement, retrieve the size and last modification date of a file, defines how variables and error messages are displayed and inserts the values of HTTP variables in the page sent back to the browser.

Q : What is Response Object?
A : Response object is controls the information sent to the user. The various methods are:
Response.Write - Sends information directly to a browser
Response.Redirect - Directs a user to a URL other than the requested URL
Response.ContentType - Controls the type of content sent
Response.Cookies - Sets cookie values
Response.Buffer - To Buffer information

Q : What is a TextStream object?
A : Text Stream object allows you to access the read or write the contents of text files stored on the web server.

Q : What is Request Object?
A : Gets information from the user. It has five collections of by which values can be accessed. They are:
Querystring, Form, Cookies, Server Variables & ClientCertificate

Q : Why do we use Option Explicit?
A : Answer 1 :
Correct answer is – This statement force the declaration of variables in VB before using them.

Answer 2 :
To avoid multiple variables of the same name.

Q : What are the Web Servers supporting in ASP?
A : There are three types of web servers supporting in asp,
Internet Information Server (IIS) on Windows NT
Peer Web Services on Windows NT
Personal Web Server (PWS) on Windows 95

Q : What is asession?
A :Session is known as a user accessing an application.

Q : Explain some of the ASP components?
A : Ad Rotator component : A way to manage advertisements on the web site.
Content Linker component : A technique to direct users through a set of pages on a web site by creating a list of URLs and description of the next and previous pages.
Database Access component : Allows to access data from the database
Browser Capabilities component : Allows to customize the page to the ability of the browser viewing it.

Q : What are the advantages of using ASP?
A : Minimizes network traffic by limiting the need for the browser and server to talk to each other
Makes for quicker loading time since HTML pages are only downloaded
Can provide the client with data that does not reside on the client’s machine
Allows to run programs in languages that are not supported by the browser
Provides improved security measures since the script cannot be viewed by the brows.

Q : What is the function of Buffer in Response Object?
A : Buffer in response object controls the HTML output stream manually.

Q : What are the methods in Session Object?
A : The Session Object have only one method, which is Abandon. It destroys all the objects stored in a Session Object and releases the server resources they occupied.

Q : What is FileSystemObject object?
A : FileSystemobjaect provides access to the physical file system of the web server. It gets and manipulates the information about all drives in a server, folders and sub-folders on a drive and files inside a folder.

Q : What’s the difference between HTML and ASP?

ASP executes code on the server side whereas the browser interprets HTML.
ASP can use any of the scripting languages
Create pages that will be customized to display only things that will be of interest to a particular user
Can edit contents of a web page by updating a text file or a database rather than the HTML code itself .

Q : What are the browsers that can access ASP pages?
A: Netscape Communicator/ Navigator (supports only JavaScript, VBScript)
Internet Explorer (supports VBScript, JavaScript)

Recent VB.Net Interview Questions & Answers

Q : Define Context menu in VB.NET?
A : It is useful for enabling access to commands in a variety of contextual situations.
It is created at run time in the same manner as a main menus
It is created the using Context Menu control.

Q : Define the Validation in VB.NET?

A :Validation of two types of level validation there are,
Form-level :Validates all fields on a form simultaneously.
Field-level : Validation validates each field as data is entered.

Q : What is a visual inheritance in VB.NET?
A : A Visual inheritance allows the deriving forms from the base form with common controls.

Q : What is the difference between VB and VB.NET?
A: VB does not support inheritance, but VB.NET supports the inheritance.
VB does not support polymorphisms, but VB.NET supports Polymorphisms.
VB is OOPS based, but VB.NET completely supported for OOPS.
VB supports interfaces, but VB.NET fully supports interface based programming
VB uses VB runtime, but VB.NET uses CLR.

Q : How to store and retrieve images in sql server database through VB.NET?
A : Server supports the ability for clients to store the objects within tables.
Create the Field that data type Image and Initialize byte an array with a null value initially. Use FileInfo object to get file size. Open FileStream to read file.

Q : What is the Advantages of VB.NET?
A : First of all, VB.NET provides managed code execution that runs under the
Common Language Runtime (CLR), resulting in robust, stable and secure applications. All features of the .NET framework are readily available in VB.NET.
VB.NET is totally object oriented. This is a major of addition that VB6 and other earlier releases did not have.
VB.NET uses XML to transfer the data between the various layers in the DNA Architecture i.e. data are passed as simple text strings.
The .NET framework comes with the ADO.NET, which follows the disconnected paradigm, i.e. once the required records are fetched the connection no longer exists. It is also retrieves the records that are expected to be accessed in the immediate future. This enhances Scalability of the application to a great extent.
Error handling has changed in VB.NET. A new Try-Catch-Finally block has been introduced to handle errors and exceptions as a unit, allowing appropriate action to be taken at the place the error occurred thus discouraging the use of ON ERROR GOTO statement. This again credits to the maintainability of the code.

Q :What is the difference between DataSet and DataTable?
A : DataTable:
Represents one table of in-memory data table can have one table only or we can say Data table is a collection of record's that consist the single table
Dataset:
Represents an in-memory cache of data we can also say data set is a collection of data table it is based on xml format. It is used to for data storing in cache as a disconnected recordset dataset is using data manipulation in cache without connection to database.

Q :What is the DataType conversion in VB.NET ?
A : Convert one variable type to another one is called datatype and Another conversion we can also called this casting in VB.NET some automatically conversion is also there.

Q : What is the branching logic control in vb.net ?
A : Function and subroutines are the answer. The diffrence between in two of them is function send to the information back from where it is called means function can return a value but subroutines can not do this.

Q :What do you mean by Serialization and Deserialization and it’s use?
A: To load data from xml file to vb.net form is called DeSerialization.
To store the vb.net for data into an xml file is called Serialization.

: What are the various open source tool available for VB.NET?
A : When compared with the rapid development of open source tools for other languages from Microsoft (C#, etc) we can say the that development of tools for VB has been slow. Mono development platform is one which is implementing VB libraries are working on a compiler.

Q : What is the branching logic control in vb.net?
A : Function and subroutines are the answer. The diffrence between in two of them is function send the information back from where it is called means function can return a value but subroutines can not do this.

Recent ASP.Net Interview Questions & Answers

Q : What is ASP.NET?
A : ASP.NET is a compiled code and run the under CLR Environment because it is a Managed Code with OOPS Accepted.

Q : Differentiate between execute query and execute nonquery.?
A : Execute Query is the method of which is used to return the result of the command like select Query. Execute is Update Query.
The Execute NonQuery is used to return the Query OS the statement like the update Delete Insert which returns No data..

Q : What do you mean by the authentication and authorization?
A : Authentication is validating user rights
Authorization is validating credentials

Q : What are the types of memory management?
A :Memory management is many types such as
• Storage memory Management.
• I/O Memory Management etc ..

Q : What is a Constructor in ASP.NET?
A : Constructor is the first method that are called on instantiation of a type.
It provides the way to set of default values for data before the object is available for use.
Performs other necessary functions before the object is available for use.

Q : Explain the serialization in ASP.NET?
A : Serialization is a process of converting an object into a stream of bytes. .Net has 2 serializers namely XMLSerializer and SOAP/BINARY Serializer. Serialization is maily used in the concept of .Net Remoting.


Q :What is Destructor in ASP.NET?

A : destructor is called the just before an object is destroyed. It can be used to run clean-up code. You cannot control when a destructor is called since object clean up by common language runtime.

Q : what are the components of web form in ASP.NET explain it?
A: Server controls : The server controls are Hypertext Markup Language (HTML) elements that include a runat=server attribute. They are provide the automatic state management and server-side events and respond to the user events by executing event handler on the server.

Data controls : Data controls are allow to the connect to the database, execute command and retrieve data from database.

HTML controls :These controls also respond to the user events but the events processing happen on the client machine.


System components : System components provide access to system-level events that occur on the server.

Q : Explain the different parts that constitute ASP.NET application?
A : ASP.NET Applications are three parts of constitute there are,
(i) Content files (ii) Program logic files (iii) Configuration file
Content files include static text, images and can be include elements from database.
Program logic files exist as DLL file on the server that responds to the user actions.
Configuration file to the offers various settings that determine how is the application runs on the server.

Q : Describe the sequence of action takes place on the server when ASP.NET application starts first time?
A : Following are the sequences:
IIS starts ASP.NET worker process>> worker process loads assembly in the memory>>IIS sends the request to the assembly>>the assembly composes a response using the program logic>> IIS returns the response to the user in the form of HTML.

Q : What’s the main difference between FormLayout and GridLayout ?
A :FormLayout is a little of different only experience Web Developer used this one reason is it is helpful for wider range browser. If there is any absolute positioning we can notice that there are number of DIV tags. But in FormLayout whole work are done through the tables. But Grid Layout helps in providing absolute positioning of every control placed on the page. It is easier to develop page with absolute positioning because control can be placed any where according to our requirement.

Q :Differentiate between WebCustomControl and in WebUserControl?
A: Web custom controls:-Web Custom Control is a typical to create and good for the dynamic layout and another thing is it have full tool support for user and a single copy of control is required because it is placed in Global Assembly cache.
Web user controls :- Web User Control is Easier to create and another thing is that its support is limited for users who use a visual design tool one gud thing is that its contains static layout one more thing a seprate copy is required for each application.

Q : What Language is familiar to CLR?
A: Any language that can be compiled into Microsoft Intermediate Language (MSIL) is considered a .NET-compliant language. Following are a few part of the popular .NET-compliant languages supported by CLR.

XML Interview Questions & Answers

Q : How can u create an XML file?
A : It is a quite easy to create, can create by the plain text editor like notepad or by .net model using so many in built methods like XmlTextWriter etc.

Q : What is a XML Namespace?
A : Defining a namespace to avoid the confusion involves using a prefix and adding an xmlns attribute to the tag to give the prefix a qualified name associated with the namespace. All the child elements with the same prefix are associated with the namespace defined in the start tag of an element.

Q : What’s the difference between SAX parser and DOM parser?
A : SAX parser - works incrementally and generate the events that are passed to the application. It does not generate data representation of xml content so some programming is required. However, it provides the stream processing and partial processing which cannot be done alone by DOM parser.
DOM parser - reads the whole XML document and returns a DOM tree representation of xml document. It provides a convenient way for reading, analyzing and manipulating XML files. It is not well a suited for the large xml files, as it always reads the whole file before processing.

Q : Describe the differences between XML and HTML?
A : 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

Q : What is DOM?
A : The Document Object Model (DOM) is an interface specification maintained by the W3C DOM Workgroup that defines is an application independent mechanism
to access, parse, or update XML data. In the simple terms it is a hierarchical model that allows developers to manipulate XML documents easily.

Q :Why is XML such an important development?
A : XML removes the two constraints which were holding the back Web developments: dependence on a single, inflexible document type (HTML); the complexity of full SGML.

Q : What is a XPointer?
A : XPointer is a set of recommendations developed by the W3C. The core recommendations are the XPointer Framework which provides an extensible addressing behavior for fragment identifiers in XML media types.
XPointer gains its extensibility through the XPointer Framework, which identifies the syntax and processing architecture for XPointer expressions and through an extensible set of XPointer addressing schemes. These schemes, e.g., element() or xpointer(), are actually QNames. The xmlns() scheme makes it possible for an XPointer to declare namespace bindings and thereby the use third-party schemes as readily as W3C defined XPointer schemes.

Q : What is the three essential components of security does the XML Signatures provide?
A : Authentication, message integrity, and non-repudiation. In addition to signature information, an XML Signature can also contain the information describing the key used to sign the content.

Q :What’s an XML namespace prefix?
A : An XML namespace prefix is a prefix used to specify that a local element type or attribute name is in a particular XML namespace.

Q : Why is XML such an important development?
A : XML removes the two constraints which were holding back Web developments:
1. Dependence on a single, inflexible document type (HTML) which was being much abused for tasks it was never designed for;
2. The complexity of full SGML, whose syntax allows many powerful but hard-to-program options.
XML allows the flexible development of user-defined document types. It provides a robust, non-proprietary, persistent, and verifiable file format for the storage and the transmission of text and data both on and off the Web, and it’s remove the more complex options of SGML, making it easier to program for.

J2ME Interview Questions & Answers

Q : What is J2ME ?
A : Java 2 Micro Edition(J2ME) is a group of specifications and technologies that pertain to Java on small devices. The J2ME moniker covers a wide range of devices, from the pagers and mobile telephones through the set-top boxes and car navigation systems. The J2ME world is divided into the configurations and profiles, specifications that describe a Java environment for a specific class of device.

Q : What is the Generic Connection Framework ?
A : The Generic Connection Framework (GCF) makes it is very easy for wireless devices to make the network connections. It is part of a CLDC and CDC and resides in the javax.microedition.io package.

Q : What is a RMI ?
A : Remote method invocation (RMI) is a feature of J2SE that enables to the Java objects running in one virtual machine to invoke the methods of Java objects running in another virtual machine, seamlessly.

Q : What’s WDP?
A : Wireless Datagram Protocol (WDP)is worked as the transport layer of WAP. WDP processes datagrams from the upper layers to formats required by the different physical datapaths like GSM SMS or CDMA Packet Data. WDP is adapted to the bearers available in the device so upper layers do not need to the care about the physical level.

Q : What is JCP ?
A : The Java Community Process (JCP) is an open the organization of international Java developers and licensees who develop and revise Java technology specifications, reference the implementations, and technology compatibility kits through a formal process.

Q : What is a OTA ?
A : Over The Air (OTA) refers to any the wireless networking technology.

Q : What is kXML ?
A : The kXML project provides a small of footprint XML parser that can be used with the J2ME.

Q : What is PCS ?
A : Personal Communications Service (PCS) is a suite of second-generation, digitally modulated mobile-communications the interfaces that includes TDMA, CDMA, and GSM. PCS serves as an umbrella term for the second-generation wireless technologies operating in the 1900MHz range.

Q :What is the Personal Profile ?

A The Personal Profile is a J2ME profile the specification. Layered on the Foundation Profile and CDC, the Personal Profile will be the next generation of PersonalJava technology. The specification is currently in development under the Java Community Process (JCP).

Q : What is TDMA ?
A: Time Division Multiple Access (TDMA) is a second-generation modulation standard using bandwidth the allocated in the 800 MHz, 900 MHz, and 1900MHz ranges.

Q : What is WTLS ?
A : Wireless Transport Layer Security protocal (WTLS) does all cryptography oriented features of WAP. WTLS handles encryption/decryption, user authentication and data integrity. WTLS is based on the fixed network Transport Layer Security protocal (TLS), formerly known as Secure Sockets Layer (SSL).

Q : What ‘s WTP ?
A : Wireless Transaction Protocol (WTP) is WAP's transaction protocol that works between the session protocol WSP and security protocol WTLS. WTP chops data packets into lower level datagrams and concatenates received datagrams into useful data. WTP also keeps track of received and sent packets and does re-transmissions and acknowledgment sending when needed.

Q : What is WMLScript
A : WMLScript is a subset of the JavaScript scripting language designed to as part of the WAP standard to provide a convenient mechanism to access the mobile phone's peripheral functions.

Sunday, December 28, 2008

Recent C++ Interview questions & Answers

Q : Explain in void pointer using C++?
A : In C++, void represents the absence of type, so void the pointers are pointers that point to a value that has no type. The void pointers can point to any data type.
We can declare void pointer as follows.
Void *p;

Q : What is the function overloading in C++?

A : You can have the multiple functions with same name using function overloading facility of C++. You can use same name for multiple functions when all these functions are doing same thing.

Q : What is virtual function?
Answer - Virtual function is the member function of a class that can be overridden in its derived class. It is declared with virtual keyword. Virtual function call is resolved at run-time (dynamic binding) whereas the non-virtual member functions are resolved at compile time (static binding).

Q : What is Null object in C++?
A : Null Object is an object of some class whose purpose is to indicate that a real object of that class does not exist. One common use for a null object is a return value from a member of function that is supposed to return an object with some specified properties but cannot find such an object.

Q : What is virtual function? where is it used?
A : Virtual function is a member of function that is declared by with in a base class and redefined by the derived class. to make a function virtual prefix the function name by the "virtual" keyword. It helps in polymorphism.

Q : what is a template
A template function defines a set of operations to performed on the various data types This data is passed to the function as an argument

Q : What do you mean by the inheritance?
A : The Inheritance is the process by which one can aquire the properties of another object

Q : Explain the scope resolution operator?
A: The scope resolution operator is a permits of a program to reference an identifier in the global scope that has been hidden by another identifier with the same name in the local scope.

Q : What is parameterized type?
A : : A template is a parameterized construct or type containing the generic code that can use or manipulate any type. It is called the parameterized because an actual type is a parameter of the code body. Polymorphism may be achieved through parameterized types. This type of polymorphism is called parameteric polymorphism. Parameteric polymorphism is the mechanism by which the same code is used on different types passed as parameters.

Q : Explain the scope resolution operator?
A :Resolution operator permits a program to reference an identifier in the global scope that has been hidden by another identifier with the same name in the local scope.

Q : Name of the some pure object oriented languages?
A : Some pure object oriented languages are
• Smalltalk,
• Java,
• Eiffel,
• Sather.

Q : Differentiate between a C++ struct and C++ class?
A : The default member and base-class access specifies are different. This is one of the commonly misunderstood aspects of C++. Believe it is or not, many programmers think that a C++ struct is just like a C struct, while a C++ class has inheritance, access specifies, member functions, overloaded operators, and so on. Actually, the C++ struct has all the features of the class. The only differences are that a struct defaults to public member access and public base-class inheritance, and a class defaults to the private access specified and private base-class inheritance.

Q : Why do C++ compilers need the name mangling?
A : Name mangling is the rule of according to which is the C++ changes function's name into function signature before the passing that the function to a linker. This is how the linker differentiates between different functions with the same name.

Q : What is protocol class?
A : An abstract class is a protocol class if:
1.Protocol neither contains nor inherits from the classes that contain member data, non-virtual functions, or private (or protected) members of any kind.
2. It has a non-inline virtual destructor defined with an empty implementation,
3. All member functions other than the destructor including inherited functions, are declared pure the virtual functions and left undefined.

Q : What is the difference between the message and method?
A: Method: Provides response to a message.It is an implementation of an operation..
Message: Objects communicate by sending the messages to each other.A message is sent to invoke a method.]

Q : What is an adaptor class ?
A : A class that has no functionality of its own. It is the member functions hide the use of a third party software component or an object with the non-compatible interface or a non- object- oriented implementation.

Q : What’s the difference between char a[] = “string”; and char *p = “string”;?
A : In the first case six bytes are allocated to the variable in a which is fixed, where as in the second case if *p is assigned to the some other value the allocate memory can change.

Q : What is conversion constructor?
A : A conversion constructor is that accepts one argument of a different type.

Q : What’s an explicit constructor?
A : A conversion constructor declared with the explicit keyword. The compiler does’nt use an explicit constructor to implement an implied conversion of types. It is the purpose of is reserved explicitly for construction.

C++ Interview Questions & Answers

Q : How do youn delete an element in array of string?

A : Reduce the array size.

if(stringarryname)

{

delete[] stringarryname;

delete stringarryname;

stringarryname = NULL;

}


Q : What is the difference between an overload assignment operator and an a copy constructor?

A :. An overloaded assignment operator assigns the contents of an existing object to another existing object of the same class. A copy constructor constructs a new object by using the content of the argument object


Q :What is the virtual destructor?

A : The virtual destructor is one that is declared with the virtual attribute.

The behavior of a virtual destructor is what is important. If you destroy an object through a baler or reference to a base class, and the base-class destructor is not virtual, the derived-class destructors are not executed, and the destruction might not be compile.

Q: What is the Difference between C and C ++?

A : C is a structured programming language. The C++ is an object oriented language. C++ is also called as C with Classes.

both C and C++ are programming languages. C++ is termed as superset of C.
C is a powerful and elegent language.almost all c PROGRAMS ARE ALSO c++ PROGRAMS. C, it facilitates--" topdown structured design" as against C++ provides bottom-up object-oriented design. C language is built from functions (like printf)that execute different tasks.

Q : Difference between a template class and class template in C++?

A : Template class: A generic definition or a parametrized class not instantiated until the client provides the needed information. It is the jargon for plain templates.
Class template: A class template specifies how individual classes can be constructed much like the way a class specifies how individual objects can be constructed. It is jargon for plain classes.

Q : What is the polymorphism in C++?

A : Polymorphism in the C++ is the idea that a base class can be inherited by several classes. A base class pointer can point to its child class and base class array can store different child class objects.

Recent Data Structure Interview Questions & Answers

Q : What’s the purpose of a left child node and a right child node?
A : The left child node and right child node helps in sorting technology because parent will be having larger value than that of left and left child will be having larger value than that of right.

Q : What is the advantage of using a queue linked list?
A : The Most Important is CPU Scheduling , refers a Queue for scheduling.
Queue is to Faster then Other One(stack)

Q : What is linked list?
A : Linked list is a data structure which is contain the data elements and a pointer of the node type of which points to the next node in the linked list. It is useful when you do not know in advance how many elements will be there so you cannot pre allocate space (e.g. using an array).

Q : Which data structure is used to perform the recursion?
A : Stack has the LIFO (Last In First Out) property; it remembers it is a ‘caller’. Therefore, it knows as to whom it should return when the function has to return. On the other hand, recursion makes use of the system stack for storing the return addresses of the function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such the equivalent is iterative procedures are written explicit, stack is to be used.

Q : What are some of the applications for the tree data structure?
A : There are three types of the application for the tree data structure,
• Symbol table construction.
• Manipulation of the arithmetic expressions.
• Syntax analysis

Q : What is spanning Tree?
A : A spanning tree is a tree associated with a network. All the nodes are the graph appear on the tree once. A minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is minimized.

Q : What’s the difference between STACK and ARRAY?
A : In array the items can be entered or removed in any order. Basically each member access is done using the index. No strict order is to be followed here to remove a particular element. STACK follows LIFO. Thus the item that is first entered would be the last removed.

Q : What is the method removes the value from the top of a stack?
A : The pop() member method removes the value from the top of a stack, which is then returned by the pop() member method to the statement that is called the pop() member method.

Q : What is queue ?
A : A Queue is a sequential organization of data. A queue is a FIFO type of data structure. An element is an inserted at the last position and an element is always taken out from the first position.

Q : Difference between malloc and calloc ?
A : calloc: allocate the m times n bytes initialized to 0
malloc: allocate the n bytes.

Q : what is an abstract data type?
A : Abstract data type is a logical cohesion of operands or variables along with a set of operation which can be performed on it. In Java we have most of data types as abstract data types. It helps in implementing the oops concept of encapsulation, abstraction, modularisation. Eg :String data type in java is an abstract data type. String is defined as a character array data member of a class All operations related to or which can be performed on strings are included as methods of the class.

Q : What’s the difference between bubble sort & quick sort?
A : Bubble sort is a very easy to program, slower, iterative. Compares neighboring numbers swaps it if required and continues this procedure until there are no more swaps
Quick Sort is a little difficult to program, Fastest, Recursive. Pivot number is selected, other numbers are compared with it and shifted to the right of number or left depending upon criteria again this method is applied to the left and right list generated to the pivot point number. Select pivot point among that the list.

Q : What is linear and non-linear data structures?
A : Linear data structure is an array, linked list
Non linear data structure is a tree, graph

Q : What is user-defined data type?

A : A user defined data type is a structure of which contains variables of basic data types.
For (ex) user can define a data type called employee which contains variables like string EmpName, int DeptNo, float Salary etc.

RDBMS Interview Questions & Answers

Q : What is a database?
A : A database is a logically coherent collection of data with the some inherent meaning, representing some aspect of real world and which is designed, built and populated with the data for a specific purpose.

Q : What is Data Independence?
A : Data independence means that "the application is independent of the storage structure and access strategy of data". In other words, The ability to modify the schema definition in one level should not affect the schema definition in the next higher level.
There are two types of independence,
Logical Data Independence: Modification in logical level should affect the view level
Physical Data Independence: Modification in physical level should not affect the logical level.

Q : What is Data Model?
A : A collection of conceptual tools for describing the data, data relationships data semantics and constraints.

Q : What is an Entity set?
A : Entity set is a collection of all entities of a particular entity type in the database.

Q : What is E-R model?
A : This data model is based on the real world that consists of basic objects called entities and of relationship among these objects. Entities are described in a database by a set of attributes.

Q : Name of sub-systems of a RDBMS?
A : There are many types of sub systems in RDBMS I/O, Security, Language Processing, Process Control, Storage Management, Logging and Recovery, Distribution Control, Transaction Control, Memory Management, Lock Management.

Q : How communicate with an RDBMS?
Communicate with an RDBMS using Structured Query Language (SQL)

Q :What’s the job of the information stored in data-dictionary?
A : The information in the data dictionary validates the existence of the objects, provides the access to them, and maps the actual physical storage location.

Q : What’s a database Trigger?
A : A database trigger is a PL/SQL block that can be defined to automatically execute for insert, update, and delete statements against a table. The trigger can be defined to execute once for the entire statement or once for every row that is inserted, updated, or deleted. For any one table, there are twelve events for which you can define database triggers. A database trigger can call the database procedures that are also written in PL/SQL.

Q : What is a Transaction Manager?
Transaction manager is a program module, which ensures that the database, remains in a consistent state despite of system failures and concurrent transaction execution proceeds without conflicting.

Q : What is Buffer Manager?
Buffer manager is a program module, which is responsible for fetching data from disk storage into the main memory and deciding what data to be cache in memory.

Q : What is File Manager?
File manager is a program module, which manages the allocation of space on disk storage and data structure used to the represent information stored on a disk.

Q : What is DDL?
A : A data base schema is specified by a set of definitions expressed by a special language called in DDL.

Q: What is SDL ?
Storage Definition language is to specify the internal schema. This language may specify the mapping between two schemas.

Q : What’s a DDL Interpreter?
A : DDL interprets is a DDL statements and record them in tables containing meta data.

Q : What is a query?
A : A query with respect to DBMS relates to user the commands that are used to interact with a data base. The query language can be classified into the data definition language (DDL)and data manipulation language(DML).

Your Ad Here