The main difference::The differences are
Category:Java Interview Questions
Tuesday, November 29, 2011
What is a string Handling? How to use it? what is difference b/w Event handling?
font
Category:Java Interview Questions
Category:Java Interview Questions
If my java based application is hanging once in a while. Where would you start looking at the problem, what changes can you do?
font
Category:Java Interview Questions
Category:Java Interview Questions
When two entity beans are said to be identical?Which method is used to compare identical or not?
Two Entity Beans are said to be Identical,if they have the same home inteface and their primary keys are the same.To test for this ,you must use the component inteface&
Category:EJB Interview Questions
Category:EJB Interview Questions
I have to view(in a JSP Page)the rows in a
Firstly send a request to server and calculate how many row are exists for executed query and store it into count.:get the data into a list and disply in jsp by using code like this using hyperlink use logic as follows
Category:JSP Interview Questions
Category:JSP Interview Questions
What packages are used by JDBC?
java.sql.BatchUpdatException Provides information about errors that occurred during batch operations
Category:JDBC Interview Questions
Category:JDBC Interview Questions
What is meant by Serialization and Externalization? Serialization is a Marker interface,so what is the use of WriteObject() anf ReadObject(), Where it is actually used? Give me some real time examples?
Marker Interface is used by java runtime engine (JVM) to identify the class for special processing.
Category:EJB Interview Questions
Category:EJB Interview Questions
What Class.forName will do while loading drivers?
Dynamic loading of Java classes at runtime provides tremendous flexibility in the development of enterprise systems. It provides for the basis of "application servers", and allows even simpler, lighter-weight systems to accomplish some of the same ends. Within Java, dynamic loading is typically achieved by calling the forName method on the class java.lang.Class; however, when Class.forName is naively called from within an Extension, strange errors can occur. This paper describes why those errors occur, and how Java2 provides two facilities, one a modification to the forName syntax, and the other, called the "Thread context ClassLoader", to avoid them. This paper assumes you are passingly familiar with Java Reflection, and have at least a general idea of what Java ClassLoaders are and how they are used within Java code. :the class.forName creates a instance of the driver and registers it with DriverManager Class. While the driver is loaded it creates a connection to the db.:Class.forName is used for load the any class into JVM&
Category:JDBC Interview Questions
Category:JDBC Interview Questions
What are the two major components of JDBC?
Two major components of JDBC are Connection Pooling and Data Sources.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
What are the common tasks of JDBC?
import java.sql.*;: JDBC is a API its communicate with relational Databases.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
What are batch updates
Batch Update facility allows multiple update operations to be submitted to a database for processing at once. Using batch updates will improve the performance.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
How to make application thread-safe ?
You should use the word synchronized to mark the critical section of code. You may also use other methods of thread synchronization (see wait(), notify(), notifyAll() etc.
Category:Java Interview Questions
Category:Java Interview Questions
How to call a Stored Procedure from JDBC?
Stored Procedures can be called in java by using the prepareCall() method which returns a CallableStatement object.:CallableStatement cs=con.prepareCall (?{call SHOW_SUPPLIERS}?);:StoredProcedure are the group of the sql statements and perform as a logical unit .
Category:JDBC Interview Questions
Category:JDBC Interview Questions
How can you retrieve data from the ResultSet?
Statement stmt = conn.createStatement(); :Connection con=null;:ResultSet is like a table containing data. Initally the cursor is before the first line.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Write the JSP command which includes sub_page.jsp and passing in
<jsp:include page ="sub_page.jsp">
Category:JSP Interview Questions
Category:JSP Interview Questions
Write the Java code to declare any constant (say gravitational constant) and to get its value.
Class ABC
Category:Java Interview Questions
Category:Java Interview Questions
Write code of any Action Class?
Here is the code of Action Class that returns the ActionForward object.:import javax.servlet.http.HttpServletRequest;
Category:Struts Interview Questions
Category:Struts Interview Questions
Write a simple bean program?
Write the SimpleBean code. Put it in a file named SimpleBean.java, in the directory of your choice. Here&
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
Write a java standalone program / method to take out all the special
class avoisSpecialChar:String sSENTENCE ="?This!is^a$t*e)s|t?";
Category:Java Interview Questions
Category:Java Interview Questions
Write a basic structure of an EJB session bean class.
//import statements://import statements
Category:EJB Interview Questions
Category:EJB Interview Questions
With EJB 1.1 specs, why is unsetSessionContext() not provided in Session Beans, like unsetEntityContext()
[Quote] ejbRemove() is called for session beans every time the container destroyes the bean. So you can use this method to do the stuff you typically would do in unsetEntityContext(). For entity beans ejbRemove() is only called if the user explicitly deletes the bean. I think that is the reason why the engineers at SUN invented the unsetEntityContext() for this kind of bean. [Quote]
Category:EJB Interview Questions
Category:EJB Interview Questions
Without using entity beans can we do database transactions?
Without using entity beans we can do database transactions through Springs .Spring can be used to configure declarative transaction management, remote access to your logic using RMI or web services, mailing facilities and various options in persisting your data to a database
Category:EJB Interview Questions
Category:EJB Interview Questions
Without home and remote interfaces cant we implement ejb?
Was just reading about EJB 3.0. I suppose with EJB 3.0, Home interface is absolutely gone and implementing Business Interface is not mandatory. All enterprise beans in EJB 3.0 are just POJO (Plain Old Java Object) with appropriate annotations.
Category:EJB Interview Questions
Category:EJB Interview Questions
Will the Struts tags support other markup languages such as WML ?
Struts itself is markup neutral. The original Struts taglibs are only one example of how presentation layer components can access the framework. The framework objects are exposed through the standard application, session, and request contexts, where any Java component in the application can make use of them.
Category:Struts Interview Questions
Category:Struts Interview Questions
Will the general public have access to the InfoBus API&
39;s?
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
Will the AWS Toolkit add support for other services?
The goal of the AWS Toolkit for Eclipse is to make it easier for all AWS Java developers to build software. We?re eager to hear our customer?s feedback and add support for additional features and/or services they need most.
Category:Eclipse Interview Questions
Category:Eclipse Interview Questions
Why would you use a synchronized block vs. synchronized method?
Synchronized blocks place locks for shorter periods than synchronized methods.:I guess, synchronized block or synchronized methods are depends on the user requirements. :First of all to achieve Multithreading mechanism in java we should go for synchronization. And this can be done in two ways depending on the requirement. :There is not a clear advantage of using synchronized method over block.:in some times only some part of the method doesn&
Category:Core Java Interview Questions
Category:Core Java Interview Questions
Why would a developer need the JavaBeans Migration Assistant for ActiveX?
Many of the capabilities that are so exciting to JavaBeans developers are not available on ActiveX, or are incomplete. There is, therefore, a need for a set of conversion conventions and tools designed to convert desktop ActiveX components into JavaBeans components. The resulting Beans will be usable in both in new network savvy e-business applications as well as traditional desktop applications, including ActiveX containers. Developers and customers benefit from the advantages offered by JavaBeans by simply leveraging their current investments in ActiveX.
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
Why will I want to integrate Hibernate service into JBoss?
JBoss registers in the JNDI tree a JTA UserTransaction Object which can be user to manage a distributed transaction.
Category:JBOSS Interview Questions
Category:JBOSS Interview Questions
Why we use static method in Business Logic?
Its a good design practice to implement the business logic in static methods.1. static method access is faster, you don&
Category:Servlet Interview Questions
Category:Servlet Interview Questions
Why we need the transactions?
Transactions ensure that database actions are consistent. Consider a case where a record is required to be added to say two databases simultaneaously. If the record is added to both the databases, action is consistent & transaction is complete but if the record is not added to one of the databases, then the action of "Add" record is rolled back across both the databases for this record, making records in both the databases consistent. Transactions ensure atomic nature of database action.
Category:EJB Interview Questions
Category:EJB Interview Questions
Why we have used to in main method in JAVA this words
The "public" keyword is an access specifier,which allows the programmer to control the visibility of class members.:public means common for all classes.:This uses public so that it is visible every where:In main method each word have specific meaning like we declare main method as public so that JVM will able to execute it(i.e. method will accessible outside the class in which it is declared).We declare it as static so that JVM will able to execute it without creating object of that class .we declare void to inform that main method doesn&
Category:Java Interview Questions
Category:Java Interview Questions
Why we can not override static method?
We can not override final method by definition, but we can override static method.:We CaNNOT override a static method. See a static method has nothing to do with the instance of the class. So when u r using a static method using .(dot) it actually subsitutes the class name. Inheritance is a concept based on instances. So when overriding u r actually redefining the method. Consider the example which will made ur concept more clear::I think one can override static method.:static method means one per class not one per instance.Overridding is done based on the type of object, and static methods are attached to a class:Static methods can be hidden. It cannot be overriden:Java does not encourage overriding the static method. Because static methods can be accessed directly from class with .(dot) operator. Hence class containing static methods does not required to create an instance to access its members.If u r using static methods just it represents the class name.Hence u cannot override static methods.:Static methods are not appeared in sub classes.we can&
Category:Java Interview Questions
Category:Java Interview Questions
Why we are not keeping Ejb class file in war
EJB runs on the application server, and war runs on your web server, that the main reason we do not put ejb classes in war file.:EJB runs on the application server, and war runs on your web server, that the main reason we do not put ejb classes in war file.
Category:EJB Interview Questions
Category:EJB Interview Questions
Why was reload removed from Struts (since 1.1)?
The problem with ReloadAction was that Struts was trying to act like a container, but it couldn&
Category:Struts Interview Questions
Category:Struts Interview Questions
Why the multiple inheritance is not possible in java and if possible HOW??
Let me explain with a example. :not possible using classes.:Actually, multiple inheritance is not possible in Java. This can be achieved through interface.:The Example of method funX()can be resolved using class object reference like y.funX().
Category:Java Interview Questions
Category:Java Interview Questions
Why should we setContentType() in servlet ?what is the use of that method?
To intimate the browser that which type of content is coming as response,Depending upon the contentType browser treats with the response.
Category:JSP Interview Questions
Category:JSP Interview Questions
Why should every class in java extend Object class?
In java u can access the data through objects.Here Object class is a super/base/parent class for all the java classes,so it will be hold all class objects of java.And also whenever u can serialize the object into the Stream we must store as form of ObjectStream object only and at the time of Deserialize the object from the Streams, u must get it as form of Object class object only.After that u must casting the object to u r Knowing class.
Category:Java Interview Questions
Category:Java Interview Questions
Why should developers use the Java Message Service?
The Java Message Service makes it easy to do the following:<br><br> * Write portable, message-based business applications<br> * Extend existing message-based applications by adding new JMS clients that interoperate fully with their existing non-JMS clients
Category:JMS Interview Questions
Category:JMS Interview Questions
Why should any swing call back implementation execute quickly?
Callbacks are invoked by the event dispatch thread. Event dispatch thread blocks processing of other events as long as call back method executes.
Category:Java Swing Programing Interview Questions
Category:Java Swing Programing Interview Questions
Why Runtime Exceptions are Not Checked?
The runtime exception classes (RuntimeException and its subclasses) are exempted from compile-time checking because, in the judgment of the designers of the Java programming language, having to declare such exceptions would not aid significantly in establishing the correctness of programs. Many of the operations and constructs of the Java programming language can result in runtime exceptions. The information available to a compiler, and the level of analysis the compiler performs, are usually not sufficient to establish that such run-time exceptions cannot occur, even though this may be obvious to the programmer. Requiring such exception classes to be declared would simply be an irritation to programmers.
Category:Core Java Interview Questions
Category:Core Java Interview Questions
Why pointers are not used in java?
The Java Language the referencing and dereferencing of objects is handled for you automatically. Java does not allow you to manipulate pointers or memory addresses of any kind. It does not allow you to cast object or array references into integers and It does not allow you to do pointer arithmetic. It does not allow you to compute the size in bytes of any primitive type or object. There are two reasons for these restrictions: :Pointers are a notorious source of bugs. Eliminating them simplifies the language and eliminates many bugs. Removing pointers allows Java to provide the security guarantees that it does. :Pointers are not used in java,why because java is a platform independent language and also it is a one type of internet based language.:1.To avoid confusion for the programmer.:Pointers is eliminated in java because pointers concept are complecated for the programmer.pointers are not secure,it generates virus.:Pointers concept is in java but with a minute application. If u observe the stack n heap concept is based on pointers. Pointers arn&
Category:Java Interview Questions
Category:Java Interview Questions
Why operator overloading is not there in java?
C++ has proven by example that operator overloading makes code almost impossible to maintain. In fact there very nearly wasn?t even method overloading in Java, but it was thought that this was too useful for some very basic methods like print(). Note that some of the classes like DataOutputStream have unoverloaded methods like writeInt() and writeByte().:I belive Operator Overloading exists in Java.:Operator overloading makes the code more complex and less readable. Also we could define different methods in the same class like plus(),plusplus(), minus() etc and thus bringing operator overloading in Java:I guess,Operator overloading is not supported in Java as its create lot of confusion instead of solving the problems. :Operator Overloading
Category:Core Java Interview Questions
Category:Core Java Interview Questions
Why operator overloading is not allowed in Java?
By using the operator overload have lot of problems is there. even some time the programmer get coufused. and its increase the complexity of the program. for that purpose only its removed in java.
Category:Java Interview Questions
Category:Java Interview Questions
Why nobody at Sun wants to read the messages sent to java-beans@java.sun.com?
Because of the fact, that 99% of all messages is spam. It is recommended to post on JavaBeans forum, which is inspected by Sun engineers on a regular basis.
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
Why multiple inheritance using classes is disadvantage in java
First of all class doesnot support multiple inheritance consider class A as superclass class B and C are sub class of A.comment : class cannot extend more than one class think class D extends B and cthe method present in class A,B,C are alike if u call a method in class d we don&
Category:Java Interview Questions
Category:Java Interview Questions
Why most users of the Spring Framework choose declarative transaction management ?
Most users of the Spring Framework choose declarative transaction management because it is the option with the least impact on application code, and hence is most consistent with the ideals of a non-invasive lightweight container.
Category:Springs Interview Questions
Category:Springs Interview Questions
why java uses singly rooted heirarchy?
All objects in Java are inherited from same base class called &
Category:Core Java Interview Questions
Category:Core Java Interview Questions
Why java shouldbe preferred,when we can get the sameoutput using VB orany otherlanguages. Howcan we convincethe interviewer ,other than givingthe simple features ofjava. could anyone pls answer this question?
It is platform independence. The client can get assurance
Category:Java Interview Questions
Category:Java Interview Questions
Why JAVA not support multiple inheritance? How can we pass address of an object?
In java first edition there is no multiple inheritance,but later editions they provided indirect multiple inheritance by interfaces and extends.:Java does not support multiple inheritance because it leads to confusion to the programmer. It is prove in the following ex.:I think example given above for Passing address of object is incorrect. and every object is passed by reference in java
Category:Java Interview Questions
Category:Java Interview Questions
Why java is system independent?
Java was designed to not only be cross-platform in source form like C, but also in compiled binary form. Since this is frankly impossible across processor architectures Java is compiled to an intermediate form called byte-code. A Java program never really executes natively on the host machine. Rather a special native program called the Java interpreter reads the byte code and executes the corresponding native machine instructions. Thus to port Java programs to a new platform all that is needed is to port the interpreter and some of the library routines. Even the compiler is written in Java. The byte codes are precisely defined, and remain the same on all platforms.
Category:EJB Interview Questions
Category:EJB Interview Questions
Why java is not pure object oriented language?
For a pure object oriented language,there should be 6 features available with it.They are:-:Because it contains eight primitive data types,these data types cannot be used as objects.:Since Java is platform independent i.e. can be run in any platform so it is not pure object oriented language.:Yes java is object oriented language,because it supports run time polymorphisms and dynamic binding.As most of the concepts achieve run time polymorphisms and dynamic binding.thus java is object oriented language.: Object oriented paradigm of programming says that everything in a programming world should felt like object mean :- "Abstract and Encapsulated" The paradigm is not completely satisfied by Java. Some of the feature that make such violation are 1. Existence of primitives which are manipulated in ordinary style . :Java is not a fully object oriented language because it does not support multiple inheritance directly.But it does so by using the concept of interfaces.:Because operator overloading does not in java.:Because it doesn&
Category:Java Interview Questions
Category:Java Interview Questions
Why Java is not fully object oriented?
Java is not a fully object oriented language because it does not support multiple inheritance directly.But it does so by using theconcept of interfaces.:whatever u told may be correct but according to u c++ is purely object oriented but we can write c++ prgrm without object.in case of java we have to create object,so i think it is purely object oriented though java may not support multiple inheritance.:whatever u told may be correct but according to u c++ is purely object oriented but we can write c++ program without object.in case of java we have to create object,so i think it is purely object oriented though java may not support multiple inheritance.:whatever u told may be correct but according to u c++ is purely object oriented but we can write c++ program without object.in case of java we have to create object,so i think it is purely object oriented though java may not support multiple inheritance.:In C++,,Without class also we can write some programs but in java every single program should be written in class so java is called pure object oriented lang,,,:For an object oriented language everything shud be treated as object but in java primitive data types are present which protect it from being object oriented. Although java gives wrapper classes for all data types which shows its efforts in becoming fully object oriented:1.java is not object oriented ,bcs its also support primitive data type:according to me java is not pure object oriented language because it does not directly support multiple inheritence and it does not gives the output in the form of object.for ex if we add two no(3+5) it gives 8 which is not the part of class and not any object:A pure Object Oriented Language is that which implements all the OOP concepts.:Java supports primitive data types such as byte, short, int, long, float, double, char & boolean. For Object oriented language everything must be declared in objectS. That&
Category:Java Interview Questions
Category:Java Interview Questions
Why Java is not 100 % pure OOPS?
Java does not support directly multiple inheritance. So is not 100% pure OOPS.:A pure Object Orientad Language is which implements All the OOP concepts.:It is said that "Everything is object in java" but primitive data types are not the objects.Secondly,it doesn&
Category:Java Interview Questions
Category:Java Interview Questions
Why Java is not 100% pure object oriented language?
Pure Object Oriented is that use principally the terms like: encapsulation, polymorphism, dynamic-binding.If you think Object Oriented means then can understand what these terms means.I&
Category:Java Interview Questions
Category:Java Interview Questions
Why Java is case sensitive?
Java is multi platform-> Platform Independent Language, so its used widely in very big softwares or games where multiple variables needed. To Differentiate among that huge no of variables,,Java is Case Sensitive.:Java is a platform independent.It can be used in any machines irrespective of platform.so it is a case sensitive. :Because java support unicode.:In java,requred so many variables and methods..for that things java is case-sensitive:To maintain discipline, in general. If it was not case sensitive, then it would be very difficult for us to understand the code. :java is platformindependent,it provides security because of this reason java is case senstive.:Java is a platform independent.Second one is To Differentiate among that huge no of variables,,Java is Case Sensitive.:Java can differenciate upper case letters ans lower case letters.:Java converts the java file into byte codes ,that is the reason it is case sensitive because different literals have different unicodes n thus byte codes.:bcose java has very big plateform to produce a better software,for security reason it has made very case sensitive than others.:Because java some keywords that used in general purpose english word . so differentiate both java is case sensitive :In java program we declare variables at any time, there is no overlapping between define variable means only once we declare variable, so java is called case sensitive.:Java is Platform independent. It is used to creat Applet Program.like game, animated movie etc. In java Every time need to creat class. so java is case sensative:Java is a platform independent.and second one is To Differentiate among that huge no of variables,Java is Case Sensitive.:it&
Category:Java Interview Questions
Category:Java Interview Questions
Why java does not support multiple inheritance.why we go for interfaces
Because the multiple inheritance causes the redundancy coz the size of the childs increases Suppose node derived from the multiple node causes the same method will be inherited in the that node so avoid redundancy....
Category:Java Interview Questions
Category:Java Interview Questions
why java does not support inheritance of multiple superclasses?
Handling the two classes always be a problem.Why we need to extends two classes at a time.If that required use two extends statements.Like this...:Why JSP/Servlets pages do not have main method?
Category:Java Interview Questions
Category:Java Interview Questions
Why it called Struts?
Because the designers want to remind us of the invisible underpinnings that hold up our houses, buildings, bridges, and ourselves when we are on stilts. This excellent description of Struts reflect the role the Struts plays in developing web applications.
Category:Struts Interview Questions
Category:Struts Interview Questions
Why is the JMS API promoted as a technology for providing communication between components within an enterprise, but not for business-to-business (B2B) communication between enterprises over the Internet? What prevents its use over the Internet?
The main issue in providing Internet-based JMS API messaging is that JMS API vendors would have to agree on a common (interoperable) wire format, and the JMS specification would have to specify a router-router API.<br><br>B2B messaging is an important area with its own unique requirements. This area is being addressed by emerging standards such as the Electronic Business XML initiative, ebXML (see http://www.ebxml.org/), where Sun is playing an active role. The ebXML initiative currently defines a Messaging Service (see the ebXML Specifications page), which supports XML messaging over the Internet. Current ebXML specifications focus on providing point-to-point asynchronous communication between parties over the Internet using multiple transport protocols such as HTTP, mail, and FTP. Work is also planned in ebXML to provide publish/subscribe XML messaging. Sun and its partners are currently defining a new Java API for XML Messaging, JAXM (see JSR
Category:JMS Interview Questions
Category:JMS Interview Questions
Why is the JavaBeans Bridge for ActiveX only available on Windows/X86?
Sun&
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
Why is the action class is singleton in nature? Isn&
39;t this creates a bottleneck for the requests?
Category:Servlet Interview Questions
Category:Servlet Interview Questions
Why is that we deploy servlets in a webserver.What exactly is a webserver?
Web server
Category:Servlet Interview Questions
Category:Servlet Interview Questions
Why is Servlet so popular?
Because servlets are platform-independent Java classes that are compiled to platform-neutral byte code that can be loaded dynamically into and run by a Java technology-enabled Web server.
Category:Servlet Interview Questions
Category:Servlet Interview Questions
Why is AWS building an Eclipse plug-in?
Many software developers use an Integrated Development Environment (IDE), such as the Eclipse Java IDE, to build software based on Amazon Web Services. By providing an Eclipse plug-in, we aim to help make it easier for software developers to do so. The AWS Toolkit for Eclipse, based on the Eclipse Web Tools Platform, guides Java developers through common workflows and automates tool configuration, such as setting up remote debugger connections and managing Tomcat containers. Previously, developers needed specific knowledge of several systems and manual processes to get Java web applications running in scalable configurations on Amazon EC2. The steps to configure Tomcat servers, run applications on Amazon EC2, and debug the software remotely are now done seamlessly through the Eclipse IDE.
Category:Eclipse Interview Questions
Category:Eclipse Interview Questions
Why is ActionForm a base class rather than an interface?
The MVC design pattern is very simple to understand but much more difficult to live with. You just need this little bit of Business Logic in the View logic or you need just that little bit of View logic in the Business tier and pretty soon you have a real mess.
Category:Struts Interview Questions
Category:Struts Interview Questions
Why init is used and not constructor for servlets initialization?
The original reason for init() was that ancient versions of 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.:Very Gud Question Posted here.
Category:Servlet Interview Questions
Category:Servlet Interview Questions
Why HTML is called as a language?
bcoz in html we write the actual source code to run the application:hyper text mark-up language.:its not only a language...:its not only a language...:HTML is called language because it is used to create web pages.:HTML is called as language because it has certain rules(tags,scripts) that are used to create web pages but its not a complete programming language because its lacks important programming constructs like conditional,looping etc.:in simple way it&
Category:JSP Interview Questions
Category:JSP Interview Questions
Why Errors are Not Checked?
A unchecked exception classes which are the error classes (Error and its subclasses) are exempted from compile-time checking because they can occur at many points in the program and recovery from them is difficult or impossible. A program declaring such exceptions would be pointlessly.:Errors are not predictable at compile time.The problem which halt the execution of program, called error and these are uncheck. So, it is difficult to provide a solution for particular problem.
Category:Core Java Interview Questions
Category:Core Java Interview Questions
Why do you use a data source object for a connection?
Data source object uses a logical name for a data source and this feature increases application portability. This removes the necessity of supplying information to each and every driver. Data source can be configured manually or automatically.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
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:
Category:Hibernate Interview Questions
Category:Hibernate Interview Questions
Why do you create interfaces, and when MUST you use one?
You would create interfaces when you have two or more functionalities talking to each other. Doing it this way help you in creating a protocol between the parties involved.:interfaces are only declarations , for that can change our functionaly with greate extent:Interfaces are mainly used for two purposes:Java does not support multiple inheritance. But it supports multiple implimentations. i.e. A class can implement more than one interfaces.So,we can make muliple inheritances indirectly through the interfaces:Interfaces define only declaration of methods and final data members.We use them when we want different definitions of methods in different classes for different purposes.:Interface is a way to provide loose coupling between the modules of an application . With the advent of frameworks like Spring this is very clear .An interface is also a very suitable way of defining a blueprint of functionality during the initial phases of a project (or more appropriately during design time).JVM and lot of frameworks/appservers use callback methods to provide run time polymorphism (Dynamic method dispatch) by using interfaces:Interface is a tool provided by Java to achieve the multiple inheritance mechanism, which is not possible directly.:Interface class is the class thru which calling function interacts with implementation methods. By using virtual keyword infront of "Implementation methods" declaration, the class can become Interface class. Late(run time) binding,Encapsulation(APIs)and avoid ambiguity between multiple inheritance could be overcome with the Interface classes.:Interface is the class thru which calling class methods can be interacted with "Implementation class" methods. By using "virtual" keyword infront of "implementation methods" declarations in the class, become interface class. Encapsulation(APIs), avoid ambiguity between multi inheritance and late binding can be achieved thru interface class implementation..:INTERFACE is a contract between class and the outside world and this contract is enforced at build time by the computer.:Interface is a way to provide more userfriendly front end envirenmentto work on it.To clubbing many modules in a single frame we need a good interface that provides a good way to access all functionality of the system.:programmer goes for the interfaces when all the features(methods) have different implementations in different objects.we can also achieve multiple inheritance through interfaces.:A programmer writes an interfaces , when all the features have different implementations for different objects. :Its not that we use interfaces as an option for inheritence, because when we inherite something we are including all that methods which are present in a super class, while interface just describes a prototype of the method it does not does not describe its complete body. :Interface is created when there is a need of relating two or more classes, say if we want to create relation of a sub class from two of the super classes(but practically this is not possible in java as it does not support multiple inheritance). so with the help of interfaces we can inherit the super classes.:interface are mainly in place of multiple inheritence and interface act as a common class to all oher classes:Interfaces are used in Java to declare functinalities of entities which may have same functinalities but implemented them in different ways, and in this way conforming them to a standard defined in the interface. For example ( completely illusive ) , :There are two main reason two create an interface : :in java there is no multiple inheritance,so to achieve multiple inheritance in java we must use interface concept:Interface is a way to provide loose coupling between the modules of an application . With the advent of frameworks like Spring this is very clear .An interface is also a very suitable way of defining a blueprint of functionality during the initial phases of a project (or more appropriately during design time).JVM and lot of frameworks/appservers use callback methods to provide run time polymorphism (Dynamic method dispatch) by using interfaces:You would create interfaces when you have two or more functionalities talking to each other. Doing it this way help you in creating a protocol between the parties involved.:Interface is just like special classes. in this is use only declare memeber function not definition. it is use as a templets. when we want to call which function then declare function defination in his class. :it is used to declare abstract classes and symbolic notation like 3.14 we can extend it through implementation.:Mainly we use interfaces for two reasons:iterface is used make the connection between two function and make it easy to implement by class:Interface provides an abstract form of a method that can by further implemented by their implemented Class. Methods in an interface are the generalized methods and implementation is depend upon their subclass behavior. Further to provide a feel of multiple inheritance in terms of Interface which is not possible with Java Classes.:You would create interfaces when you have two or more functionalities talking to each other. Doing it this way help you in creating a protocol between the parties involved.:Only method declaration is possible in interface.But in abstract class it is possible to define methods.:Only method declaration is possible in interface.But in abstract class it is possible to define methods.:Interfaces provide basic behavior for an application/module which can be implemented/improved further by the classes which are going to implement the interface, and an application with interfaces will always have multiple inheritance facility.:In java interface is used for two main purpose:Interface in java used in two purposes.:Interface is the colletion of method declaration.only declaration not defination ,so interface solve the multipul inheritance prob,if you want to inherit multipul method you can use interface.:We can use interfaces to declare a set of methods that will be used in different classes for different purposes.:Incase of using same method for different functionality we have to use interface.:we create interface bcoz ...:encapsulation implies program and codes in single unit:Through interface one class can inherit the properties of multiple classes in multiple inheritence trees.Its also possible through multiple inheritence but complexity increases.thats why java does not allow multiple inheritence but indirectly give the facility through interface.:we create interface :Interface is a blueprint for implementing several types of methods in different classes.In project implementation initially lead people think about the Interfaces and they ll design.and also multiple inheritance is also possible. :Interface is a blue print which has methods declaration and final variables. It is common lass for many other class. Interface is created to implement the multiple inheritance which java doesn&
Category:Java Interview Questions
Category:Java Interview Questions
Why do we use prepared statement when already statement is present
Actually when u submit a simple statement to the databse, at first the DBMS parses it and sends it back with the result, so again when u send the same statement again the DBMS server parses it and sends back the result so here a lot of time is wasted and because the statement is again parsed though it has been sent twice or thrice it consumes a lot of time and response will be slow.Prepared Statement is used when u want to execute a statement object many times. when u submit a PreparedStatement the DBMS server parses it and creates a execution plan. This e-plan can be used when u again send the same statement to the database.That is the DBMS server zest executes the compiled statement rather that executing it from first, hence we get an precompiled statement.And also the advanatge of using this PreparedStatement is it is used to send dynamic sql statements, which u can give values later than giving the values at the time of creation.:prepared statement compile only once at start while statement compiles every time when we run a java file.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Why do we override the execute method is struts? Plz give me the details?
As part of Struts FrameWork we can decvelop the Action Servlet,ActionForm servlets(here ActionServlet means which class extends the Action class is called ActionServlet and ActionFome means which calss extends the ActionForm calss is called the Action Form servlet)and other servlets classes.<br><br>In case of ActionForm class we can develop the validate().this method will return the ActionErrors object.In this method we can write the validation code.If this method return null or ActionErrors with size=0,the webcontainer will call the execute() as part of the Action class.if it returns size > 0 it willnot be call the execute().it will execute the jsp,servlet or html file as value for the input attribute as part of the <action -mapping> attribute in struts-config.xml file.<br><br>In case of Action class the execute() method retuen the ActionForward object.in execute() we can write (return mapping.findForward("success");)here mapping is the object for the ActionMapping class.After that it will forward the request to the "success" jsp file.(here success is context path for the jsp file,it is written in web.xml. <br>
Category:Struts Interview Questions
Category:Struts Interview Questions
Why do we need Struts?
ava technologies give developers a serious boost when creating and maintaining applications to meet the demands of today&
Category:Struts Interview Questions
Category:Struts Interview Questions
Why do we need interface in Java. Instead of interface we can write the methods in the class itself. Why do we need seperate interface?
Java don&
Category:Java Interview Questions
Category:Java Interview Questions
Why do we call java until.* package as a framework.
The Util package bascially contains Collection as its part. A collections framework is a unified architecture for representing and manipulating collections. All collections frameworks contain the following: :This package is used for thread programming and perform some operations on thread.
Category:Java Interview Questions
Category:Java Interview Questions
Why do threads block on I/O?
Threads block on i/o (that is enters the waiting state) so that other threads may execute while the i/o Operation is performed.
Category:Java Interview Questions
Category:Java Interview Questions
Why do I have to reaccess the database for Array, Blob, and Clob data?
Most DBMS vendors have implemented these types via the SQL3 Locator type
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Why do I get UnsatisfiedLinkError when I try to use my JDBC driver?
The first thing is to be sure that this does not occur when running non-JDBC apps. If so, there is a faulty JDK/JRE installation. If it happens only when using JDBC, then it&
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Why do I get the error "org.eclipse.swt.SWTException: Invalid thread access"?
SWT implements a single-threaded UI model often called apartment threading. In this model, only the UI-thread can invoke UI operations. SWT strictly enforces this rule. If you try and access an SWT object from outside the UI-thread, you get the exception "org.eclipse.swt.SWTException: Invalid thread access".
Category:Eclipse Interview Questions
Category:Eclipse Interview Questions
Why do I get a NullPointerException when loading a JAR file into the BeanBox?
Usually this is because of a mistake in the JAR file being loaded. In the meantime, typical errors include:
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
Why do I get a duplicate name error when loading a JAR file?
The most common reason for a "java.lang.ClassFormatError: Duplicate name" error is that a .class file in the JAR contains a class whose class name is different from the expected name. So for example if you have a file called "a/B.class" and it contains a class called "B" or "a.X" instead of the class "a.B" then you will get this error.<br><br>The most common causes for this problem are either forgetting to include a "package a;" statement or having a "package" statement with the wrong name.
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
Why does the toolkit only support Tomcat?
Tomcat is a popular application server, but it is by no means the only application server used by Java developers. Now that the project has launched, we will listen to our customer feedback to determine additional application servers to support. The project is open source, so our customers can contribute support for additional application servers.
Category:Eclipse Interview Questions
Category:Eclipse Interview Questions
Why does the ODBC driver manager return &
39;Data source name not found and no default driver specified Vendor: 0&
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Why does my applet work with Appletviewer, but not with a browser?
I tried to run two of the applets in the examples directory of the distribution. I installed the WebLogic classes on my local machine (NT server) and on another machine (a Windows 95 client). I am not using any browsers, just trying to run the applets with Appletviewer. The applets work fine when I run Appletviewer from the NT server, but do not work at all from the Windows 95 client.<br><br>A. There are two possible problems: Either the CODEBASE tag is not properly set in the applet HTML file, or the class files are not properly loaded on the HTTP server.<br><br>The applet works on the NT server because you installed the WebLogic distribution on your NT server. Even if the applet cannot successfully load the necessary classes from the HTTP server, it does find them in your local CLASSPATH. But when you try to run it from the Windows 95 client, the applet must load the classes over the wire from the HTTP server, and if you haven&
Category:Applet Interview Questions
Category:Applet Interview Questions
Why does JComponent have add() and remove() methods but Component does not?
because JComponent is a subclass of Container, and can contain other components and jcomponents. How can I implement a thread-safe JSP page? - You can make your JSPs thread-safe by having them implement the SingleThreadModel interface. This is done by adding the directive <%@ page isThreadSafe="false" % > within your JSP page.
Category:JSP Interview Questions
Category:JSP Interview Questions
Why does Java not support Multiple Inheritance?
java does not support multiple inheritance because different classes may have different variable with same name that may be be contradicted and can cause confusions resulting in errors.:confusion may not be the problem because we use interface for multiple inheritance so there we will mention function names so the primary reason may be the complexity of holding objects of different datatypes:so that one could get easy view by interfacethat program is using multiple inheritance.Hence to increase readability of code. :Java doesn&
Category:Core Java Interview Questions
Category:Core Java Interview Questions
Why does EJB needs two interfaces(Home and Remote Interface)
There is a pure division of roles between the two .
Category:EJB Interview Questions
Category:EJB Interview Questions
Why doesn?t the JMS API provide end-to-end synchronous message delivery and notification of delivery?
Some messaging systems provide synchronous delivery to destinations as a mechanism for implementing reliable applications. Some systems provide clients with various forms of delivery notification so that the clients can detect dropped or ignored messages. This is not the model defined by the JMS API. JMS API messaging provides guaranteed delivery via the once-and-only-once delivery semantics of PERSISTENT messages. In addition, message consumers can insure reliable processing of messages by using either CLIENT_ACKNOWLEDGE mode or transacted sessions. This achieves reliable delivery with minimum synchronization and is the enterprise messaging model most vendors and developers prefer. The JMS API does not define a schema of systems messages (such as delivery notifications). If an application requires acknowledgment of message receipt, it can define an application-level acknowledgment message.
Category:JMS Interview Questions
Category:JMS Interview Questions
Why doesn?t LSDOU work under Windows NT?
If the NTConfig.pol file exist, it has the highest priority among the numerous policies.
Category:Java Security Interview Questions
Category:Java Security Interview Questions
Why doesn&
39;t the JMS API provide subscription notification? If it were possible for a publisher to detect when subscribers for a topic existed, it could inhibit publication on unsubscribed topics.
Category:JMS Interview Questions
Category:JMS Interview Questions
Why doesn&
39;t the JMS API provide end-to-end synchronous message delivery and notification of delivery?
Category:JMS Interview Questions
Category:JMS Interview Questions
Why doesn&
39;t the focus feature on the <html:form> tag work in every circumstance?
Category:Struts Interview Questions
Category:Struts Interview Questions
Why did my JDBC code throw a rollback SQLException?
A. Your JDBC code may throw the following exception:
Category:EJB Interview Questions
Category:EJB Interview Questions
Why did I get a LockTimedOutException?
A. When you get a LockTimedOutException while invoking a stateful session EJB, one of two things has occurred:
Category:EJB Interview Questions
Category:EJB Interview Questions
Why default constructor of base class will be called first in java?
Because from any constructor of the subclass first a call is made to super() unless you specifically make any super call with args() eg super(arg1,arg2).
Category:Java Interview Questions
Category:Java Interview Questions
Why CMP beans are abstract classes?
We have to provide abstract data to object mapping that maps the fields in our bean to a batabase, and abstract methods methods that corelate these fields.
Category:EJB Interview Questions
Category:EJB Interview Questions
Why can&
39;t I run the JMS API sample programs using the J2EE 1.2.x SDK?
Category:JMS Interview Questions
Category:JMS Interview Questions
Why can&
39;t I invoke the ResultSet methods afterLast and beforeFirst when the method next works?
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Why can&
39;t I hold on to a cmr-field (Container Managed Relationship) collection and use it after the transaction commits?
Category:EJB Interview Questions
Category:EJB Interview Questions
Why can&
39;t I call the setXXX method for a cmr-field during ejbCreate?
Category:EJB Interview Questions
Category:EJB Interview Questions
Why a component architecture for the Java platform?
JavaBeans brings the extraordinary power of the Java platform to component development, offering the ideal environment for a developer who wants to extend the concept of reusable component development beyond one platform and one architecture to embrace every platform and every architecture in the industry.
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
Why ArrayList is faster than Vector?
ArrayList is faster than Vector, because ArrayList is not synchronized. Synchronization will reduce the performance of Vector.: we can specify the increment size with the vector and with array list we cannot.:ArrayList are not synchronized.Hence its faster than Vector. :I&
Category:Java Interview Questions
Category:Java Interview Questions
Why are there two separate JMS API domains, point-to-point and publish/subscribe, instead of just one?
Even though there are many similarities, providing separate domains still seems to be important. It means that vendors aren&
Category:JMS Interview Questions
Category:JMS Interview Questions
Why are some of the class and element names counter-intuitive?
The framework grew in the telling and, as it evolved, some of the names drifted.
Category:Struts Interview Questions
Category:Struts Interview Questions
Why are my checkboxes not being set from ON to OFF?
A problem with a checkbox is that the browser will only include it in the request when it is checked. If it is not checked, the HTML specification suggests that it not be sent (i.e. omitted from the request). If the value of the checkbox is being persisted, either in a session bean or in the model, a checked box can never unchecked by a HTML form -- because the form can never send a signal to uncheck the box. The application must somehow ascertain that since the element was not sent that the corresponding value is unchecked.
Category:Struts Interview Questions
Category:Struts Interview Questions
Why are JSP pages the preferred API for creating a web-based client program?
Because no plug-ins or security policy files are needed on the client systems(applet does). Also, JSP pages enable cleaner and more module application design because they provide a way to separate applications programming from web page design. This means personnel involved in web page design do not need to understand Java programming language syntax to do their jobs.
Category:JSP Interview Questions
Category:JSP Interview Questions
Why are ejbActivate() and ejb Passivate() included for stateless session bean even though they are never
The simple reason is to manage your resources. For eg. if you use/open any third party resource on ejbActivate, you need to make sure ejbPassivate close the connection/ release the use of resource regardless of stateful session or stateless session
Category:EJB Interview Questions
Category:EJB Interview Questions
Why are ejbActivate() and ejb Passivate() included for stateless session bean even though they are never required as it is nonconversational bean?
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.
Category:EJB Interview Questions
Category:EJB Interview Questions
Why are component architectures useful?
Developers are turning to creating components rather than monolithic applications to free themselves from slow, expensive application development, and to build up a portable, reusable code base. This enables developers to quickly attack new market opportunities, new joint development opportunities, and new ways to sell smaller packages of software.
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
Why aren&
39;t the Struts tags maintained as part of the Jakarta Taglibs project ?
Category:Struts Interview Questions
Category:Struts Interview Questions
Why an onMessage call in Message-driven bean is always a seperate transaction
The MDB is stateless and inherently each message is unique with respect to the MDB.
Category:EJB Interview Questions
Category:EJB Interview Questions
Why an onMessage call in Message-driven bean is always a seperate transaction?
EJB 2.0 specification: "An onMessage call is always a separate transaction, because there is never a transaction in progress when the method is called."
Category:EJB Interview Questions
Category:EJB Interview Questions
Who wrote Struts?
here are several active committers to the Struts project, working cooperatively from around the globe. Dozens of individual developers and committers contributed to the Struts 1.x codebase. All interested Java developers are invited to contribute to the project. Struts is a Apache Software Foundation project, with the mission to "provide secure, enterprise-grade server solutions based on the Java Platform that are developed in an open and cooperative fashion".
Category:Struts Interview Questions
Category:Struts Interview Questions
Who will run the execute method in struts?
Request Processor.:The web Container calls the Execute Method with the help of the Action class we write.:Action Class:request processor class run the execute method inside this class.:Request dispatcher will run the execute method. :ActionClass:Action Servlet will execute the the execute method in action class of struts.:Request Processor is responsible for creating the action object(if it does not exist) because action will be created only once and call the execute method when a request comes.:Action Servlet will run the execute method in Struts, as it is the main controller of struts. :org.apache.struts.actions.*;:Action class:Internally the Request Processor will call the execute method by specified actionclass:The controller (RequestProcessor) will select an appropriate Action for each request, create an instance (if necessary), and call the execute method.:Action Servlet will invoke the corresponding execute method of the requested action:execute() method is called by processActionPerform() method of RequestProcessor class:org.apache.struts.actions.Action:Action Servlet have to read the structs configaration file in application and to send the request to appropriate Action class(it&
Category:Struts Interview Questions
Category:Struts Interview Questions
Who was involved with Sun in the creation of the specification of Java Message Service 1.0.2?
A: A number of important industry players initially collaborated with Sun to define the first draft of the Java Message Service specification. In addition, many comments were received from other companies, government and educational organizations, and others during the three-month public review period.
Category:JMS Interview Questions
Category:JMS Interview Questions
Who makes the Struts?
Struts is hosted by the Apache Software Foundation(ASF) as part of its Jakarta project, like Tomcat, Ant and Velocity.
Category:Struts Interview Questions
Category:Struts Interview Questions
Who makes the EJBObject class?
EJBObject class is made by the Container
Category:EJB Interview Questions
Category:EJB Interview Questions
Who is developing the JavaBeans Migration Assistant to ActiveX?
IBM and Taligent, its object oriented technology subsidiary, with support from JavaSoft, are developing a set of conversion conventions, a porting guide and tool that will allow developers to easily convert their Windows ActiveX components into JavaBeans.
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
Who are the users of JSF technology?
JSF is that it has not only been designed for coding experts but for others also Page authors, Component writers etc. Because of integrating MVC model and flexible in its architecture JSF allows a wide range of users :
Category:JSF Interview Questions
Category:JSF Interview Questions
While in CallableStatament using in the oracle my procedure is return no.of columns so in java
In procedure u will have some out parameter with datatype. so according to that we will have to set in callablestatement object registerOutParameter(7,OracleTypes.VARCHAR2 or or INTEGER or CURSOR);
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which version of my browser should I use?
Generally, the latest version is the safest. Be sure to regularly check your browser vendor&
Category:Java Security Interview Questions
Category:Java Security Interview Questions
Which type of JDBC driver is the fastest one?
JDBC Net pure Java driver(Type IV) is the fastest driver because it converts the jdbc calls into vendor specific protocol calls and it directly interacts with the database.:Type 4
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which security principal does an MDB use to connect to JMS?
A. As of WLS 6.1 SP2, an MDB uses the same principle to connect to JMS as it does to process messages. This is either the principle that is mapped to the run-as role specified for the bean, or &
Category:EJB Interview Questions
Category:EJB Interview Questions
Which one is better to create a thread by implementing Runnable or By Extending Thread in java?
Creating a thread by implementing Runnable interface is best.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the statement below does not correctly defines the difference between JDBC and ODBC ?
ODBC requires manual installation of the ODBC driver manager and driver on all client machines. While for JDBC driver are written in Java and JDBC code is automatically installable, secure and portable on all platforms.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the statements is true regarding loading a driver in JDBC.1. registerDriver(Driver driver).2. Class.forName(java.lang.String driverclass)
Both 1 and 2 are correct. A static block is written in every Driver class to register the driver, which gets executed when the class is loaded.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the statements are true regarding availability of the integrated version of JDBC API and the JDBC-ODBC Bridge in JDK.
The JDK 1.1 and the Java 2 SDK, Standard Edition (formerly known as the JDK 1.2), contain both the JDBC API and the JDBC-ODBC Bridge.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the following values can be replaced in the place of 1 and 2 belowStatement stmt = con.createStatement(1, 2);
ResultSet. TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the following statement is true regarding the three tier model in the JDBC driver model architecture.
This the correct answer,
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the following statement is true for the Type 2 JDBC driver?
This driver is referred to as a "native-API, partly Java driver."
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the following statement is false regarding the use of setAutoCommit() in JDBC
By default the JDBC call is in auto-commit mode.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the following statement is false regarding the exceptions in JDBC
The JDBC-ODBC Bridge does not support concurrent access from different threads. The JDBC-ODBC Bridge uses synchronized methods to serialize all of the calls that it makes to ODBC. Multi-threaded Java programs may use the Bridge, but they won&
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the following statements is true regarding the two tier model of the JDBC driver model.
A JDBC driver is required to communicate with the particular database management system that is being accessed.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the following statements is true regarding the failing of the class.forName in jdk 1.1.x.
The correct answer is D.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the following is true regarding the use of the JDBC-ODBC bridge with the applets.
Pure Java JDBC drivers work well with applets. They are fully downloadable and do not require any client-side configuration
Category:JDBC Interview Questions
Category:JDBC Interview Questions
which of the following is not a valid javascript operator?
font
Category:Java Patterns Interview Questions
Category:Java Patterns Interview Questions
Which of the following is not an isolation level in the JDBC.
TRANSACTION_READ_UNCOMMITTED
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the following is false regarding the Type 3 JDBC driver
Vendors of database middleware products can implement this type of driver into their products to provide interoperability with the greatest number of database servers.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the following is false for the Type 4 drivers in java
As Type 4 drivers are 100% Java, use Java sockets to connect to the database, and require no client-side data access code, they are ideal for applets or other download situations inside a firewall.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the following is false for the Type 1 JDBC bridge driver?
Both the database and middle tier need to be Java compliant.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the following describes the correct sequence of the steps involved in making a connection with a database.1. Loading the driver2. Process the results.3. Making the connection with the database.4. Executing the SQL statements.
Making connection with the database:correct sequence is:
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the following allows phantom read in JDBC, connection class?
TRANSACTION_REPEATABLE_READ.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which of the following allows non repeatable read in JDBC, connection class?
TRANSACTION_READ_UNCOMMITTED:TRANSACTION_READ_UNCOMMITTED:TRANSACTION_READ_UNCOMMITTED:TRANSACTION_REPEATABLE_READ and
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which models are supported by JMS?
Publish/subscribe (pub/sub). This model allows a client (publisher) to send messages to a JMS topic. These messages are retrieved by other clients (subscribers) (it may happen so that a topic has no subscribers) asynchronously. Pub/sub model requires a broker distributing messages to different consumers.
Category:JMS Interview Questions
Category:JMS Interview Questions
Which method of the Component class is used to set the position and size of a component?
setBounds
Category:Java Swing Programing Interview Questions
Category:Java Swing Programing Interview Questions
Which method is used for setting security in applets?
setSecurityManager()
Category:Java Swing Programing Interview Questions
Category:Java Swing Programing Interview Questions
Which method is used by the applet to recognize the height and width?
getParameters()
Category:Java Swing Programing Interview Questions
Category:Java Swing Programing Interview Questions
Which method is static synchronized in JDBC API _________
getConnection():As java static rules suggest that it should access by class name only and DriverManager implements Connection interface whose static method getConnection() is called with the name of DriverManager, thus getConnection() is static and no other thread should create connection on the same resource at the same time, it is declared as synchronized also.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which method is more advantageous doGET() or doPOST()? in which situation does we use doGET() then?
Both are are advantageous..Both are having some differences..That are
Category:Servlet Interview Questions
Category:Servlet Interview Questions
Which Java operator is right associative?
The = operator is right associative.
Category:Java Interview Questions
Category:Java Interview Questions
Which Java and java.sql data types map to my specific database types?
JDBC is, of necessity, reliant on the driver and underlying DBMS. These do not always adhere to standards as closely as we would like, including differing names for standard Java types. To deal with this, first, there are a number of tables available in the JDK JDBC documentation dealing with types.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which is the preferred collection class to use for storing database result sets?
When retrieving database results, the best collection implementation to use is the LinkedList. The benefits include:
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which is the best driver among the 4 jdbc drivers?how can we load that driver?
Use Type 4 driver for applet to database communication.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which is the best book to start learning Java Swing and JFC?
the best book wid complete code examples is
Category:Java Swing Programing Interview Questions
Category:Java Swing Programing Interview Questions
Which is superclass of Exception?
"Throwable", the parent class of all exception related classes.: Throwable
Category:Core Java Interview Questions
Category:Core Java Interview Questions
Which is more secure: Java or ActiveX?
This is a complicated question with no simple answer, so we wrote a separate FAQ about it.
Category:Java Security Interview Questions
Category:Java Security Interview Questions
Which isolation level prevents dirty read in JDBC, connection class.
TRANSACTION_READ_ COMMITTED
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which Driver is preferable for using JDBC API in Applets.
As we know that applets has many restrictions on the remote machine on which they are executed.But they can make connections to the server from which they have been originated.As the database obviously lies on the server side it can make socket connections with the server.So TYPE4 driver is suitable to use in applet communications.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Which deployment descriptor used in struts?
Struts configuration file: struts-config.xmlWeb Application Deployment Descriptor: web.xml
Category:EJB Interview Questions
Category:EJB Interview Questions
Which containers use a FlowLayout as their default layout?
The Panel and Applet classes use the FlowLayout as their default layout.
Category:Java Swing Programing Interview Questions
Category:Java Swing Programing Interview Questions
Which containers use a border Layout as their default layout in swing?
The window, Frame and Dialog classes use a border layout as their default layout.:Frame
Category:Java Swing Programing Interview Questions
Category:Java Swing Programing Interview Questions
Which component handles cluster communication in JBoss ?
The JGroups framework provides services to enable peer-to-peer communications between nodes in a cluster. It is built on top a stack of network communication protocols that provide transport, discovery, reliability and failure detection, and cluster membership management services.
Category:JBOSS Interview Questions
Category:JBOSS Interview Questions
Which Collection class is used for FIFO in Java
java.util.Concurrent ( Queues)
Category:Java Interview Questions
Category:Java Interview Questions
Which code line must be set before any of the lines that use the PrintWriter?
setContentType() method must be set before transmitting the actual document.
Category:Servlet Interview Questions
Category:Servlet Interview Questions
Which class is extended by all other classes?
The Object class is extended by all other classes.:the parent class or base class is extended by other classes.:A Singleton is a class which at any given time has only one:Object class:Object class is the class which is extended by all other class.it is under the Java.lang.There is no need to import it(Bydefaultit is imported).so it is not clear by observing a simple code whether object class is extended or not. :Object class is inherited by all the subclasses.it is the super class of every class we create.It is imported by default.:Object class is super class of all other classes in Java.
Category:Java Interview Questions
Category:Java Interview Questions
Which characters may be used as the second character of an identifier, but not as the first character of an identifier?
The digits 0 through 9 may not be used as the first character of an identifier but they maybe used after the first character of an identifier.
Category:Java Interview Questions
Category:Java Interview Questions
Which are features in EJB 2.0 ? and which are features in EJB 3.0?
POJO - Plain old Java Objects..
Category:EJB Interview Questions
Category:EJB Interview Questions
Where to use which driver in JAVA?
The following is some information I could find on web regarding JDBC drivers:
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Where do we use hidden variables and url rewriting? and wat is the difference between them?
Both hidden variable and URL rewriting are used for session tracking. The only advantage in hidden variable is that the URL looks neat. In URL rewriting, each and every variable is added to the URL (called GET parameters).Example: profile.jsp?name=dilip+surname=iyer
Category:JSP Interview Questions
Category:JSP Interview Questions
Where did Eclipse come from?
Eclipse started out as proprietary technology, led by IBM?s subsidiary, Object Technology International (OTI). IBM wanted to reduce the large number of incompatible development environments being offered to its customers and to increase the reuse of the common components in those environments. By using the same common framework, development teams could leverage one another?s components, integrate to a high degree, and allow developers to roam among projects.
Category:Eclipse Interview Questions
Category:Eclipse Interview Questions
Where can we find the compiled file of jsp in the directory struture.
Better i know which webserver u r using? i hope u know that any webserver would convert your jsp file into a java file first compile it into a .class file and then load it in the memory. In a sense, instead of you doing the work of compiling and loading the file, the webserver does it. Somewhat similar to that of Servlet concepts. if you are using Apache Tomcat 4.1, the webserver creates the .java file in the classes directory in c:Tomcat4.1.
Category:JSP Interview Questions
Category:JSP Interview Questions
Where can I get help with Struts?
he Struts package comes complete with a Users Guide to introduce people to the framework and its underlying technologies. Various components also have their own in-depth Developers Guide, to cover more advanced topics. Comprehensive Javadocs are included along with the full source code. For your convenience, these are bundled together as a self-installing application. The struts-documentation.war is the same bundle that is deployed as the Struts Web site.
Category:Struts Interview Questions
Category:Struts Interview Questions
Where can I get a copy of Struts?
The best place to download Struts is at struts.apache.org. The nightly builds are very stable, and recommended as the best place to start today.
Category:Struts Interview Questions
Category:Struts Interview Questions
Where can I find the Java Message Service specification?
A: The Java Message Service 1.0.2 specification is available at http://java.sun.com/products/jms/docs.html. A link to the online JMS API documentation is at the same location.
Category:JMS Interview Questions
Category:JMS Interview Questions
Where can I find info, frameworks and example source for writing a JDBC driver?
There a several drivers with source available, like MM.MySQL, SimpleText Database, FreeTDS, and RmiJdbc. There is at least one free framework, the jxDBCon-Open Source JDBC driver framework. Any driver writer should also review For Driver Writers.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
Where can I find a JMS API discussion group?
You can find a JMS API discussion forum at http://java.sun.com/j2ee/community/forums/index.html. You must be a member of the Java Developer Connection to join this forum.
Category:JMS Interview Questions
Category:JMS Interview Questions
Where are group policies stored?
Group policies stored at:
Category:Java Security Interview Questions
Category:Java Security Interview Questions
When you will chose Stateful session bean and Stateless session bean?
Stateful session beans are used when there is converstional state and when there is a need of temporary storage
Category:EJB Interview Questions
Category:EJB Interview Questions
When you use a struts framework, where would you place your business logic
We know how servlets and JSP&
Category:Java Interview Questions
Category:Java Interview Questions
When you have action=get?
When we are sure that we are going to send certain amount of bytes or characters upto 400 bytes , we can use GET. If it exceeds that limit we can go for POST. Any number of bytes can be sent over the net as name and value pair and bundled with HTTP.
Category:Servlet Interview Questions
Category:Servlet Interview Questions
When you declare a method as abstract, can other nonabstract methods access it?
Yes, other nonabstract methods can access a method that you declare as abstract.:No, Abstract method has only definition no implementation so other methods cannot access it until and unless we provide the body in the sub class.:Yes , non abstract method can access abstract method , but this abstract method will be implemented in its subclass and the same will be invoked from the non abstarct method of abstract super class. if not implemented the subclass must also be an abstract class. so doesn&
Category:Core Java Interview Questions
Category:Core Java Interview Questions
When will JavaBeans be supported on the [fill in the blank] platform/operating system?
The complete set of JavaBeans APIs are core to Java 2, hence any platform that is fully compatible with Java 2 implicitly supports JavaBeans. Thus, JavaBeans support will be available as soon as this platform/operating system vendor supports Java 2.
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
When we should go for codebase in applet?
If the applet class is not in the same directory, codebase is used.
Category:Java Swing Programing Interview Questions
Category:Java Swing Programing Interview Questions
When we increase the buffer size in our project using page directive attribute &
39;buffer&
Category:Servlet Interview Questions
Category:Servlet Interview Questions
When we have the servlets/struts what is the perpose of EJB
EJBs have totally different purpose than Servlets/Struts. EJBs are used for business components which require some basic set of features like transaction/persistance etc. and EJBs are hosted in Application servers.Serlvets are used for handling HTTP requests and generally for generating dynamic content for web page. And struts is a framework for Web application. http://struts.apache.org/
Category:Servlet Interview Questions
Category:Servlet Interview Questions
When we don&
39;t write any constructor for the servlet, how does container create an instance of servlet?
Category:Servlet Interview Questions
Category:Servlet Interview Questions
When we design some login form how we manage security for those forms?which technology used for that purpose?
Use session tracking concepts. so that it ensure only authenticated users are allowed to access the page.
Category:JSP Interview Questions
Category:JSP Interview Questions
When we are sending the serialized array object thro the network, what is being passed ? is the value or the reference ?
Java has only pass by value associated with it. Even when an Object is passed the value of Object reference in the Stack is passed(not the actual Object in Heap) But since the value passed in is a reference to an Object any modification to the data in this Object will modify the data in original Object. But any assignment operation done to the passed value will not affect the orignal object.
Category:Java Interview Questions
Category:Java Interview Questions
When we are saving form bean ,What is the difference between session scope and request scope.
If you are using request scope the ActionForm is available only until the end of the request/response cycle.one the response has been returned to the client the actionform and the data within it are no langer accessible.if u want to keep the form data around for langer than a sigle request your can fonfig an actonform to have session scope
Category:Servlet Interview Questions
Category:Servlet Interview Questions
When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?
All major browsers ignore it even though the HTML 3.2 and 4.0 specifications require it. But building a DOCTYPE line tells HTML validators which version of HTML you are using so they know which specification to check your document against. These validators are valuable debugging services, helping you catch HTML syntax errors.
Category:Servlet Interview Questions
Category:Servlet Interview Questions
WHEN UR USING ARRAYLIST AND LIKEDLIST AND VECTOR AND HASHMAP AND HASHTABLE?
All are use when we want to handle Objects, alougth difference is
Category:Java Interview Questions
Category:Java Interview Questions
When to use struts technology?
Struts forces us to use MVC architecture. It helps in code maitainability. It also eliminates most of the repetitive code which is common to most of the web applications.
Category:JSP Interview Questions
Category:JSP Interview Questions
When to use programmatic and declarative transaction management ?
Programmatic transaction management is usually a good idea only if you have a small number of transactional operations.
Category:Springs Interview Questions
Category:Springs Interview Questions
When to use Interface over abstract class?
I want to know when to use interface over abstract class. One reason could be because you are extending another class. But it wont be known until some one implements the interface. So I want to know in Java API how came up with decisions that some thing should be interface/ abstract class. I am able to find the difference between interface and abstract class, but not when it should be used.
Category:Java Interview Questions
Category:Java Interview Questions
When should we use session bean/entity bean?I was unable to judge?For Example :For Airline Project where we can use EJB&
39;s?
Category:EJB Interview Questions
Category:EJB Interview Questions
When should I use a Stateful session bean and when should I use a servlet session?
A. The answer to this question is very application-specific and there are situations in which either approach will work. A stateful session bean provides declaritive transaction and security checking as well as failover to a secondary in a cluster.
Category:EJB Interview Questions
Category:EJB Interview Questions
When should I use abstract classes and when should I use interfaces?
Use Interfaces when?
Category:Core Java Interview Questions
Category:Core Java Interview Questions
When should i used notify() and notifyall() methods on threads
To wakes up the threads which are in waiting stateaddition notes:-notify() wakes up a single thread which is waiting on the object&
Category:Java Interview Questions
Category:Java Interview Questions
When many Users are browsing the same application at the same time and they click the "Submit" button will many objects be created for each and every User?
when we implement SingleThread Model one object will be created for every request, otherwise only one object will be created irrespective of the number of requests.
Category:JSP Interview Questions
Category:JSP Interview Questions
When MalformedURLException and UnknownHostException throws?
When the specified URL is not connected then the URL throw MalformedURLException and If InetAddress? methods getByName and getLocalHost are unable to resolve the host name they throw an UnknownHostException.
Category:Socket Programing Interview Questions
Category:Socket Programing Interview Questions
When jsp is compiled into servlet, where the servlet is actually stored(storage location)?
In Tomcat, it is stored under work directory of tomcat
Category:JSP Interview Questions
Category:JSP Interview Questions
When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?
An instance of servlet is created when the servlet is loaded for the first time in the container. Init() method is used to configure this servlet instance. This method is called only once in the life time of a servlet, hence it makes sense to write all those configuration details about a servlet which are required for the whole life of a servlet in this method.:servlet object is created in many number of instances:
Category:Servlet Interview Questions
Category:Servlet Interview Questions
When is the finally clause of a try-catch-finally statement executed?
The finally clause of the try-catch-finally statement is always executed unless the thread of execution terminates or an exception occurs within the execution of the finally clause.:The finally clause will always will be executed even if try block or catch block throws an exception, but if we mention System.exit() in try block or catch block , then finally will not be getting executed.
Category:Java Interview Questions
Category:Java Interview Questions
When is an object subject to garbage collection?
An object is subject to garbage collection when it becomes unreachable to the program inwhich it is used.
Category:Java Interview Questions
Category:Java Interview Questions
When do I need "struts.jar" on my classpath?
When you are compiling an application that uses the Struts classes, you must have the "struts.jar" on the classpath your compiler sees -- it does not have to be on your CLASSPATH environment variable.
Category:Struts Interview Questions
Category:Struts Interview Questions
When does a plugin get started?
Each plug-in can be viewed as having a declarative section and a code section. The declarative part is contained in the plugin.xml file. This file is loaded into a registry when the platform starts up and so is always available, regardless of whether a plug-in has started. The code section are laze loaded by default. They are activated only when their functionality has been explicitly invoked by the user.
Category:Eclipse Interview Questions
Category:Eclipse Interview Questions
When destroy method get call, will it call for each user please give the ans in detail?
Difference between Service() method and doget() method,,:When u want to shutdown the server web container automatically calls the destroy().
Category:Servlet Interview Questions
Category:Servlet Interview Questions
When can an object reference be cast to an interface reference?
An object reference be cast to an interface reference when the object implements the referenced interface.:an object reference is cast into interface reference when we the class is implementing that interface .this is done specially in the case of event handeling when we pass the refernce of our class ,which is caught in reference variable of the interface.this is also done when jvm creates the object ,for example in the case of threads which implements runnable
Category:Java Interview Questions
Category:Java Interview Questions
When a thread blocks on I/O, what state does it enter
When a thread blocks on I/O, it enters to BLOCKED state. A thread enters WAITING state, while a thread calls wait(), and it will come back to READY state, while other threads call notify() or notifyAll(). The wait-notify model is called monitor pattern.
Category:Java Interview Questions
Category:Java Interview Questions
When a servlet accepts a call from a client, it receives two objects. What are they?
ServeltRequest: which encapsulates the communication from the client to the server.:After developing the Web application:When container receives a call from client, it creates two objects. 1. HTTPRequest and 2 HTTPResponse.:When any action performed in the UI(ex. Button click and type is post/get) webcontainer receives and mapped to the corresponding servlet as per the mapping provided in the web.xml.
Category:Servlet Interview Questions
Category:Servlet Interview Questions
When a client request is sent to the servlet container, how does the container choose which servlet to invoke?
The servlet container determines which servlet to invoke based on the configuration of its servlets, and calls it with objects representing the request and response.
Category:Servlet Interview Questions
Category:Servlet Interview Questions
When are stateless EJBs passivated?
A. Stateless ejbs are never passivated. Since stateless ejbs do not have state, there is no need to passivate them. They are put back into the free pool after each method call so they will be available to service other requests.
Category:EJB Interview Questions
Category:EJB Interview Questions
When are ejbCreate and ejbRemove called on stateless EJBs?
A. When the stateless beans are created and removed by the EJB container. Note that this does not correspond to calls to create and remove on the stateless home. Depending on your initial-beans-in-free-pool setting, beans may be created by the container during deployment at which point they are placed in the free pool. Aside from during deployment, beans will only be created to service requests when all of the beans in the free pool are in use and the max-beans-in-free-pool limit has not been met. Stateless beans are removed by the EJB container during undeployment.
Category:EJB Interview Questions
Category:EJB Interview Questions
When are CMP fields loaded? Is it always determined by the finders-load-bean setting? What is the default behavior?
A. Finders-load-bean is true by default. A bean is retrieved via a finder explicitly if you call a findXXX() method to get the bean and implicitly if you retrieve the bean via a cmr-field getXXX method. Either of these will result in eager loading of the bean&
Category:EJB Interview Questions
Category:EJB Interview Questions
What you know about Corba implementation in Java?
Java 1.2 promises full CORBA IDL support.
Category:Java Interview Questions
Category:Java Interview Questions
What will happen when we call the destroy method in the init method? will the servlet exist?
The destroy method is not called as it is considered unsuccessful initialization. During initialization, the servlet instance can throw an UnavailableException or a ServletException. In this case, the servlet must not be placed into active service and must be released by the servlet container.
Category:Servlet Interview Questions
Category:Servlet Interview Questions
What will be the coding for two radio buttons inside the panel?
font
Category:JSP Interview Questions
Category:JSP Interview Questions
What we will define in Struts-config.xml file. And explain their purpose?
In struts-config.xml we define Date Sources / Form Beans / Global Exceptions / Global Forwards / Action Mappings / Message Resources / Plug-ins:Struts-Config.xml is one of the most important part of any web application based on Sturts. This file is responsible for instructing the Struts what forms are available, what actions are available, and also allows a number of plug-in models to be added to the base Struts package. It can contain Data Source Configuration,Form Bean Definitions, Global Forward Definitions,Action Mapping Definitions, Message Resources Definitions etc.
Category:Struts Interview Questions
Category:Struts Interview Questions
What version of JBoss AS do I need to run Seam?
For Seam 1.3: Seam was developed against JBoss 4.2. Seam can still be run against JBoss 4.0. The seam documentation contains instructions for configuring JBoss 4.0.
Category:JBOSS Interview Questions
Category:JBOSS Interview Questions
What value does read() return when it has reached the end of a file?
The read() method returns -1 when it has reached the end of a file.
Category:Java Interview Questions
Category:Java Interview Questions
What typical JSF application consists of?
A typical JSF application consists of the following parts:
Category:JSF Interview Questions
Category:JSF Interview Questions
What type of files are required to deploy an application into Web sphere. How can they be installed?
WAR or EAR files.
Category:Web Sphere Interview Questions
Category:Web Sphere Interview Questions
What type messaging is provided by JMS ?
Both synchronous and asynchronous are provided by JMS.
Category:JMS Interview Questions
Category:JMS Interview Questions
What type messaging is provided by JMS?
Both synchronous and asynchronous.
Category:JMS Interview Questions
Category:JMS Interview Questions
What state is a thread in when it is executing?
An executing thread is in the running state.
Category:Java Interview Questions
Category:Java Interview Questions
What state does a thread enter when it terminates its processing?
When a thread terminates its processing, it enters the dead state.
Category:Java Interview Questions
Category:Java Interview Questions
What services can be obtained by implementing Java Servlets?
These are the following services which can be obtained by using Java servlets they are: -
Category:Servlet Interview Questions
Category:Servlet Interview Questions
What scalar functions can I expect to be supported by JDBC?
JDBC supports numeric, string, time, date, system, and conversion functions on scalar values. For a list of those supported and additional information, see section A.1.4 Support Scalar Functions in the JDBC Data Access API For Driver Writers. Note that drivers are only expected to support those scalar functions that are supported by the underlying DB engine.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
What r the disadvantages of struts?
Few Disadvantage are mentioned in the below link. Struts have disadvantages mainly on performance of the application. Especially when using advanced tag like nested-loop etc, Resulting in creating many Forms object then required.
Category:Struts Interview Questions
Category:Struts Interview Questions
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.
Category:Hibernate Interview Questions
Category:Hibernate Interview Questions
What role does the SessionFactory interface play in Hibernate?
The application obtains Session instances from a SessionFactory. There is typically a single SessionFactory for the whole application?created during application initialization. The SessionFactory caches generate SQL statements and other mapping metadata 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
Category:Hibernate Interview Questions
Category:Hibernate Interview Questions
What restrictions are placed on method overriding?
Overridden methods must have the same name, argument list, and return type. The overriding method may not limit the access of the method it overrides. The overriding method may not throw any exceptions that may not be thrown by the overridden method.
Category:Java Interview Questions
Category:Java Interview Questions
What restrictions are placed on method overloading?
Two methods may not have the same name and argument list but different return types.:In method overloading function name will be same but the argument count or type or order must vary. They can have different return type also.:The only restriction on method overloading is the signature of the method.The signature is the number, type, and order of the arguments passed to a method.Any number of methods which have the same name(unless overridden) cannot have the same signature,though they can have the same return types in the same scope.The compiler uses the signature to detect which overloaded method to refer when a overloaded method is called.If two methods have the same name and signature the compiler will throw an runtime error. :restrictions for method overloading:
Category:Java Interview Questions
Category:Java Interview Questions
What part of MVC does Struts represent
Struts is mainly famous for its Action Controller - which is nothing but the CONTROLLER part of MVC Pattern. :Action controller is used in mvc mostly. It represents struts framework and also used for presentation layer to provide business logic and data.
Category:Struts Interview Questions
Category:Struts Interview Questions
What packages are used by JDBC?
There are 8 packages::Only a single package is required java.sql or javax.sql:There is one package: java.sql or javax.sql
Category:JDBC Interview Questions
Category:JDBC Interview Questions
What open source projects are based on Eclipse?
Thousands of projects of various sizes are based on Eclipse. A small number are directly supported by the Eclipse Foundation as official Eclipse projects but a far greater number can be found elsewhere on the Web. Many are hosted at such sites as Source Forge or can be found in the various Eclipse plug-in listings floating around the Web. The following are the best-known portals for finding Eclipse-based plug-ins:
Category:Eclipse Interview Questions
Category:Eclipse Interview Questions
What modifiers may be used with a top-level class?
A top-level class may be public, abstract, or final.
Category:Java Interview Questions
Category:Java Interview Questions
What modifiers can be used with a local inner class?
A local inner class may be final or abstract.:Below modifiers can be applied to Inner class:
Category:Java Interview Questions
Category:Java Interview Questions
What modifiers are allowed for methods in an Interface?
Only public and abstract modifiers are allowed for methods in interfaces.
Category:Core Java Interview Questions
Category:Core Java Interview Questions
What method used to add a jsp to the servlet
The RequestDispatcher.include(req, resp) is used to add a jsp to the servlet.
Category:Servlet Interview Questions
Category:Servlet Interview Questions
What method should the key class of hashmap override
The methods to over ride are equals() and hashCode(). :What if you don?t override the hashcode() method while adding objects as keys in to the hashtable:
Category:Java Interview Questions
Category:Java Interview Questions
What method must be implemented by all threads?
All tasks must implement the run() method, whether they are a subclass of Thread orimplement theRunnable interface.
Category:Java Interview Questions
Category:Java Interview Questions
What method is used to specify a container&
39;s layout?
Category:Java Swing Programing Interview Questions
Category:Java Swing Programing Interview Questions
What method is invoked to cause an object to begin executing as a separate thread?
The start() method of the Thread class is invoked to cause an object to begin executing as a separate thread.
Category:Java Interview Questions
Category:Java Interview Questions
What methods will be called in which order?
Mainly we are talking about servlets life cycle.Here first init() ->service() ->wthin servlets we use these method accordingly. ->destry().
Category:Servlet Interview Questions
Category:Servlet Interview Questions
What message distribution policy does the JMS API specify when there are two or more QueueReceivers for the same queue at the same time?
The JMS API does not specify a message distribution policy when two or more QueueReceivers are registered with a destination at the same time. JMS API semantics account for only one QueueReceiver at any point in time. The JMS API does not prohibit multiple QueueReceivers for a queue; it just does not define the behavior for this case.
Category:JMS Interview Questions
Category:JMS Interview Questions
What kind of industry support exists for JavaBeans?
A coalition of industry leaders in component development worked with JavaSoft to create the JavaBeans specification, which was released to the Internet for public comments on September 4, 1996. The "frozen" JavaBeans specification combines the work of Apple, Borland, IBM, JustSystem, Microsoft, Netscape, Rogue Wave, SunSoft and Symantec and many, many others... We&
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
What kind of bean(entity/session) will you use if there are no database transactions and all you use is a read-only database.
It depends on the available infrastructure and programming efforts to be put in.Read only Entity bean(CMP) will minimize progarmmer time and effors, if one is comfortable with CMP developmet.Stateless or BMP requires more effort and coding than CMP
Category:EJB Interview Questions
Category:EJB Interview Questions
What JSP lifecycle methods can I override?
You cannot override the _jspService() method within a JSP page. You can however, override the jspInit() and jspDestroy() methods within a JSP page. jspInit() can be useful for allocating resources like database connections, network connections, and so forth for the JSP page. It is good programming practice to free any allocated resources within jspDestroy().
Category:JSP Interview Questions
Category:JSP Interview Questions
What JDK release does the JMS API need?
The JMS API requires JDK/JRE release 1.1.x or higher.
Category:JMS Interview Questions
Category:JMS Interview Questions
What JDBC objects generate SQLWarnings?
Connections, Statements and ResultSets all have a getWarnings method that allows retrieval. Keep in mind that prior ResultSet warnings are cleared on each new read and prior Statement warnings are cleared with each new execution. getWarnings() itself does not clear existing warnings, but each object has a clearWarnings method.
Category:JDBC Interview Questions
Category:JDBC Interview Questions
What it the root class for all Java classes?
Object is the root class for all java classes.:Object class is the default super class for predefined classes and user defined classes.So of we want to return object form any method we will return Object type.
Category:Java Interview Questions
Category:Java Interview Questions
What is Java Server Faces (JSF) - Spring integration mechanism?
Spring provides a custom JavaServer Faces VariableResolver implementation that extends the standard JavaServer Faces managed beans mechanism. When asked to resolve a variable name, the following algorithm is performed:
Category:Springs Interview Questions
Category:Springs Interview Questions
What is WTLS?
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).
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is WSP
Wireless Session Protocol (WSP) implements session services of WAP. Sessions can be connection-oriented and connectionless and they may be suspended and resumed at will.
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is WMLScript
WMLScript is a subset of the JavaScript scripting language designed as part of the WAP standard to provide a convenient mechanism to access mobile phone&
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is WML?
The Wireless Markup Language (WML) is a simple language used to create applications for small wireless devices like mobile phones. WML is analogous to HTML in the World Wide Web.
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is WMA
The Wireless Messaging API (WMA) is a set of classes for sending and receiving Short Message Service messages.
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is Weak reference and Soft reference in java?
Soft Reference :-->
Category:Java Interview Questions
Category:Java Interview Questions
What is WDP
Wireless Datagram Protocol (WDP) works as the transport layer of WAP. WDP processes datagrams from upper layers to formats required by different physical datapaths, bearers, that may be for example GSM SMS or CDMA Packet Data. WDP is adapted to the bearers available in the device so upper layers don&
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is W-CDMA?
Wideband Code-Division Multiple Access (W-CDMA), also known as IMT-2000, is a 3rd generation wireless technology. Supports speeds up to 384Kbps on a wide-area network, or 2Mbps locally.
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is WAP Gateway
A WAP Gateway acts as a bridge allowing WAP devices to communicate with other networks (namely the Internet).
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is WAP-Gateway?
A WAP Gateway acts as a bridge allowing WAP devices to communicate with other networks (namely the Internet
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is WAP
Wireless Application Protocol (WAP) is a protocol for transmitting data between servers and clients (usually small wireless devices like mobile phones). WAP is analogous to HTTP in the World Wide Web. Many mobile phones include WAP browser software to allow users access to Internet WAP sites.
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is WAE
The Wireless Application Environment (WAE) provides a application framework for small devices. WAE leverages other technologies such as WAP, WTP, and WSP.
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is VLR?
The Visitor Location Register (VLR) is a database that contains temporary information about subscribers.
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is view object?
A view object is a model object used specifically in the presentation tier. It contains the data that must display in the view layer and the logic to validate user input, handle events, and interact with the business-logic tier. The backing bean is the view object in a JSF-based application. Backing bean and view object are interchangeable terms.
Category:JSF Interview Questions
Category:JSF Interview Questions
What is use of JVM?
JavaVirtualMachine(JVM) is a set of program inside the computer that can execute other program or script
Category:Java Interview Questions
Category:Java Interview Questions
What is use of implict Objects?why the container is given those one?
Implicit object is a predefine object which is provide by jsp engine. Is machinegun is easy for processing all basic work.
Category:JSP Interview Questions
Category:JSP Interview Questions
What is upward and downward casting in Java?
In upward casting small datatype is casted in to big data type such as byte is casted as int type.but in downward casting the big data type is casted into small data type such as long is casted into int or byte.
Category:Java Interview Questions
Category:Java Interview Questions
What is UMTS?
Developed by Nortel Networks, Universal Mobile Telecommunications Service (UMTS) is a standard that will provide cellular users a consistent set of technologies no matter where they are located worldwide. UMTS utilizes W-CDMA technology.
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is UDDI?
Universal Description, Discovery, and Integration (UDDI) is an XML-based standard for describing, publishing, and finding Web services. UDDI is a specification for a distributed registry of Web services.
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is transient variable?
A transient variable is not stored as part of its objects persistent state.
Category:Java Interview Questions
Category:Java Interview Questions
What is transactional write-behind?
Hibernate uses a sophisticated algorithm to determine an efficient ordering that avoids database foreign key constraint violations but is still sufficiently predictable to the user. This feature is called transactional write-behind.
Category:Hibernate Interview Questions
Category:Hibernate Interview Questions
What is TOMCAT?
Tomcat is a reference implementation of the Java servlet and JavaServer Pages (JSP) specifications. It is intended as a platform for developing and testing servlets.
Category:J2ME Interview Questions
Category:J2ME Interview Questions
What is thin driver and thick driver.why it is called so?
Basic difference between thin and thick client
Category:JDBC Interview Questions
Category:JDBC Interview Questions
What is the widely used web programming technology? what is the advantages of JSP among other technologies?
JSP is precompiled & dynamic.:If you use the jsp technology other than servlets it improves the performane of the application why because of in servlets we implementing business logic and presentation logic in servlets only.:PHP is the widely using web programming technology and about Jsp&
Category:JSP Interview Questions
Category:JSP Interview Questions
What is the What is the difference between invokeAndWait() and invokeLater()? ?
invokeAndWait() method in swing is synchronous. It blocks until Runnable task is complete. InvokeLater() method in swing is asynchronous. It posts an action event to the event queue and returns immediately. It will not wait for the task to complete
Category:Java Swing Programing Interview Questions
Category:Java Swing Programing Interview Questions
What is the webserver used for running the Servlets?
Web server for running the servlets:Mainly to run the servlets we will use Apache Tomcat sever,Sunone Studio.(websevers).But servlets also run in the Application server such as Weblogic,websphere,Jboss.:Normally to run the servlets Tomcat webserved must be used more are less we will run the same servlet using(Application servers ) jboss,Websphere,weblogic,SunApplication Server :we run the Servlets in Apache Tomcate (web-server)as well as a Web-application like weg-logic. but we prefer tomcate because we can deploy the servlet classfiles very fast. as well as we can get output very fast.so that we will prefer tomcat
Category:Java Interview Questions
Category:Java Interview Questions
What is the use of using session facade design pattern in EJB&
39;S?
Category:EJB Interview Questions
Category:EJB Interview Questions
What is the use of unicast remote object
When a class implements Remote interface it can not available in the client class.Thats why if we extends UnicastRemoteObject then we can rebind it through Naming.rebind("ref",objofserverclass)
Category:Java Interview Questions
Category:Java Interview Questions
What is the use of TextMessage?
TextMessage contains instance of java.lang.String as it&
Category:JMS Interview Questions
Category:JMS Interview Questions
What is the use of System.err.println()?, explain clearly what is System.err.println()?, what r the access specifiers available in System class?
The standard input, output, and error streams -- System.in, System.out, and System.err -- are all byte streams.
Category:Java Interview Questions
Category:Java Interview Questions
What is the use of StreamMessage?
StreamMessage carries a stream of Java primitive types as it&
Category:JMS Interview Questions
Category:JMS Interview Questions
What is the use of Servlets?
servlet is serverside programming.when client send request to sever then by using servlet server try to response to client.:Servlet is the java code. Which is run in server. By this we can design a a page in run time and we can write the server side code also.:Servlet is a java program that run at server side. It enables us to create dynamic pages.
Category:Java Interview Questions
Category:Java Interview Questions
What is the use of ServletConfig and ServletContext..?
An interface that describes the configuration parameters for a servlet. This is passed to the servlet when the web server calls its init() method. Note that the servlet should save the reference to the ServletConfig object, and define a getServletConfig() method to return it when asked. This interface defines how to get the initialization parameters for the servlet and the context under which the servlet is running.
Category:Servlet Interview Questions
Category:Servlet Interview Questions
What is the use of ObjectMessage?
ObjectMessage contains a Serializable java object as it&
Category:JMS Interview Questions
Category:JMS Interview Questions
What is the use of Message object?
Message is a light weight message having only header and properties and no payload. Thus if the received are to be notified abt an event, and no data needs to be exchanged then using Message can be very efficient.
Category:JMS Interview Questions
Category:JMS Interview Questions
What is the use of MapMessage?
A MapMessage carries name-value pair as it&
Category:JMS Interview Questions
Category:JMS Interview Questions
What is the use of JMS? In which situations we are using JMS? Can we send message from one server to another server using JMS?
JMS is the ideal high-performance messaging platform for intrabusiness messaging, with full programmatic control over quality of service and delivery options.
Category:JMS Interview Questions
Category:JMS Interview Questions
what is the use of JMS?In which situations we are using JMS?Can we send message from one server to another
You can use it in the context of mutithreading but it means JMS is not meant for Multithreading. Its basically meant for object communication.
Category:JMS Interview Questions
Category:JMS Interview Questions
What is the use of findbyprimarykey()?
The findByPrimaryKey() method works like the read() method, except that the findByPrimaryKey() method retrieves a single TxObject directly from the database using a primary key without going through a TxCursor. The primary key can be any primary key. For example, RealmId is the official primary key for the PIRealm table. Because the realm name is unique, it can also be used as an alternate primary key to retrieve a realm.
Category:Servlet Interview Questions
Category:Servlet Interview Questions
What is the use of finally block?
The finally block encloses code that is always executed at some point after the try block, whether an exception was thrown or not. This is right place to close files, release your network sockets, connections, and perform any other cleanup your code requires.:Finally block is used to handle an exception(The common error which stop the complete execution of program.) in JAVA. It can be better understood by the following code::finally block is also called as resource handler block.this block is used for frees the resources at the time of terminating the program.these resources are used for other programs.:finally block is also called as resounce handler block.it is follewed by try(if catch is there,after catch)block.it is compulsary executing block eventhough exceptions are rised.:finally block is executing by default means , whether try block rised exception or not and whether the rised exception is handiled by catch block or not by automatically finally block will be executing. :finally block is not executing in only one sinario i.e is when the try block contained the System.exit statement that time finally block will not be executing. Except this condition in all remaining conditions finally block will be executing by default.:One doubt why use Finaly ? we can give the same code to release memory and etcc... even after catch block
Category:Core Java Interview Questions
Category:Core Java Interview Questions
what is the use of extends in jsp...we we want to import a class in current jsp file which i am working how can i do that ...if i use extnds for that means how can i do that...pls explain me this
Extends="package.class"
Category:JSP Interview Questions
Category:JSP Interview Questions
What is the use of dynamic-insert and dynamic-update attributes in a class mapping?
Criteria is a simplified API for retrieving entities by composing Criterion objects. This is a very convenient approach for functionality like "search" screens where there is a variable number of conditions to be placed upon the result set.
Category:Hibernate Interview Questions
Category:Hibernate Interview Questions
What is the use of BytesMessage?
BytesMessage contains an array of primitive bytes in it&
Category:JMS Interview Questions
Category:JMS Interview Questions
What is the use of activate, passivate methods in EJB?
Ejb activate() and passivate() methods are playing good role in ejbs.
Category:EJB Interview Questions
Category:EJB Interview Questions
What is the use of ActionForm class, Describe it&
39;s Life Cycle
Category:Struts Interview Questions
Category:Struts Interview Questions
What is the typical Bean life cycle in Spring Bean Factory Container ?
Bean life cycle in Spring Bean Factory Container is as follows:
Category:Springs Interview Questions
Category:Springs Interview Questions
What is the sweep and paint algorithm
The painting algorithm takes as input a source image and a list of brush sizes.
Category:Java Interview Questions
Category:Java Interview Questions
What is the super class of All servlets?
The Class GenericServlet is the super class of all known servlets. This class is extended by other classes like HttpServlet. The GenericServlet class is protocol independent.
Category:Servlet Interview Questions
Category:Servlet Interview Questions
What is the servlet?
Servlet is used to handle request and response.Multiple concurrent request accessing the service method of the same servlet instance.that is Thread safe=true if it is false means it implements one interface called single thread model. Now a days we are using servlet we can&
Category:Servlet Interview Questions
Category:Servlet Interview Questions
What is the servlet life cycle?
Each servlet has the same life cycle::The Web container is responsible for managing the servlet?s life cycle. The Web container creates an instance of the servlet and then the container calls the init() method. At the completion of the init() method the servlet is in ready state to service requests from clients. The container calls the servlet?s service() method for handling each: The Life Cycle of a Servlet:init ---- servlet initializes and searches for dd(deployment descriptor) in which startup parameters are given:the following steps manage the servlet life cycle -::Servlet life cycle fall on 3 steps :
Category:Servlet Interview Questions
Category:Servlet Interview Questions
What is the Servlet Interface?
The central abstraction in the Servlet API is the Servlet interface. All servlets implement this interface, either directly or, more commonly, by extending a class that implements it such as HttpServlet.
Category:Servlet Interview Questions
Category:Servlet Interview Questions
What is the servlet?
Servlets are modules that extend request/response-oriented servers, such as Java-enabled web servers. For example, a servlet may be responsible for taking data in an HTML order-entry form and applying the business logic used to update a company&
Category:Servlet Interview Questions
Category:Servlet Interview Questions
What is the serialization?
The serialization is a kind of mechanism that makes a class or a bean persistence by having its properties or fields and state information saved and restored to and from
Category:Java Interview Questions
Category:Java Interview Questions
What is the serializable class in java beans?
Any class is serializable as long as that class or a parent class implements the java.io.Serializable interface. Examples of serializable classes include Component, String, Date, Vector, and Hashtable.
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
What is the Role of the JMS Provider?
JMS is the ideal high-performance messaging platform for intrabusiness messaging, with full programmatic control over quality of service and delivery options.
Category:JMS Interview Questions
Category:JMS Interview Questions
What is the request processor in struts? how it works?
The RequestProcessor Class is the actual place where the request processing takes place in a Struts controller environment.When the request object first reaches the actionservlet class then it invokes the process method of the underlying RequestProcessor Class.This process method then looks into the struts-config.xml file and tries to locate the name of the action that has come with the request.Once it identifies the action in the xml file it continues the rest of the steps needed for request processing(for details on this pls go thru Wrox).
Category:Servlet Interview Questions
Category:Servlet Interview Questions
What is the relation between the InfoBus and RMI?
The InfoBus architecture addresses Beans talking to one in a single JVM not across multiple JVMs; while RMI (Remote Method Invocation) is intended for communication across JVMs (different Java Virtual Machines across the network). As for IIOP, one can envision a JavaBeans component that uses RMI to talk to something on another JVM and then publishes the data on the InfoBus.
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
What is the relationship between the Java Message Service, the Java Transaction API, and the Java Transaction Service?
The Java Transaction API (JTA) provides a client API for delimiting distributed transactions and an API for accessing a resource&
Category:JMS Interview Questions
Category:JMS Interview Questions
What is the relationship between the Java Message Service and the Java Naming and Directory Interface (JNDI) API?
The JMS API, like the other Java Enterprise APIs, uses the JNDI API for administration. The JMS API defines ConnectionFactories and Destinations as administered objects that are configured and placed in a JNDI naming context. JMS clients then look up and use these preconfigured objects. This insures that JMS applications are easy to deploy and administer.
Category:JMS Interview Questions
Category:JMS Interview Questions
What is the relationship between the Java Message Service and the Java DataBase Connectivity (JDBC) API?
JMS clients may also use the JDBC API. They may use both the JMS API and the JDBC API in the same transaction. In most cases, they will achieve this automatically by implementing these clients as enterprise beans. They may also use the Java Transaction API.
Category:JMS Interview Questions
Category:JMS Interview Questions
What is the relationship between the Java Message Service and Enterprise JavaBeans components?
Since J2EE version 1.2 was released, Enterprise JavaBeans components have been able to use the JMS API to send enterprise messages and receive them synchronously. The Java 2 SDK, Enterprise Edition, version 1.3, now available, provides a new kind of enterprise bean, the message-driven bean, that allows an enterprise application to receive messages asynchronously.
Category:JMS Interview Questions
Category:JMS Interview Questions
What is the relationship between Sun&
39;s JFCs and JavaBeans?
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
What is the relationship between Enterprise JavaBeans and JavaBeans?
Enterprise JavaBeans extends the JavaBeans component model to handle the needs of transactional business applications.
Category:Java Beans Interview Questions
Category:Java Beans Interview Questions
What is the relationship between clipping and repainting?
When a window is repainted by the AWT painting thread, it sets the clipping regions to the area of the window that requires repainting.
Category:Java Interview Questions
Category:Java Interview Questions
What is the recoverability of messages for closed consumers?
..A: For messages consumed from a queue or durable subscription, a rollback ensures that the messages are not acknowledged and that they will be delivered to the next consumer of these persistent entities. The JMS specification states that messages delivered to non-durable subscribers may be dropped. This statement means that the JMS API does not define the recoverability of messages consumed from a non-durable subscriber.
Category:JMS Interview Questions
Category:JMS Interview Questions
What is the query used to display all tables names in SQL Server (Query analyzer)?
select * from information_schema.tables
Category:JDBC Interview Questions
Category:JDBC Interview Questions
What is the purpose of tiles-def.xml file, resourcebundle.properties file, validation.xml file?
1. tiles-def.xml:Tiles Framework is one of the advanced framework which reduces the replication in JSP Codes. Suppose we have an application where Page should display with some header (Logo of the company, welcome message if user is logged in), vertical menu (like available products as links), body part(product details once user clicks on product link of vertical menu), footer (licence info, contact links etc), then tiles helps us to have a common header jsp, vertical menu jsp, footer jsp and different body.jsps for each product and allows to merge them seperately with one name. Tiles-def.xml is a configuration file used to merge the JSPs with one common name.
Category:Struts Interview Questions
Category:Struts Interview Questions
What is the purpose of the wait(), notify(), and notifyAll() methods?
The wait(), notify(), and notifyAll() methods are used to provide an efficient way forthreads to wait for a shared resource. When a thread executes an object&
Category:Java Interview Questions
Category:Java Interview Questions
What is the purpose of the System class?
The purpose of the System class is to provide access to system resources.
Category:Java Interview Questions
Category:Java Interview Questions
What is the purpose of the Runtime class?
The purpose of the Runtime class is to provide access to the Java runtime system.:Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running. The current runtime can be obtained from the getRuntime method.
Category:Java Interview Questions
Category:Java Interview Questions
What is the purpose of the finally clause of a try-catch-finally statement?
The finally clause is used to provide the capability to execute code no matter whether or not an exception is thrown or caught.:Hi...
Category:Java Interview Questions
Category:Java Interview Questions
What is the purpose of the enableEvents() method?
The enableEvents() method is used to enable an event for a particular object. Normally, an event is enabledwhen a listener is added to an object for a particular event. The enableEvents() method isused by objects that handle events by overriding their event-dispatch methods.
Category:Java Interview Questions
Category:Java Interview Questions
Subscribe to:
Posts (Atom)