Programming Tutorials

Interview Tutorials

21. What is bean managed transaction?

By: Karthik : 2012-06-16

Description: Answer: In EJB transactions can be maintained by the container or developer can write own code to maintain the transaction. If a developer doesn't want a Container to manage transactions, developer can write own code to maintain the database transaction.


22. What is transient variable?

By: Karthik : 2012-06-16

Description: Answer: Transient variable can't be serialize. For example if a variable is declared as transient in a Serializable class and the class is written to an ObjectStream, the value of the variable can't be written to the stream instead when the class is retrieved from the ObjectStream the value of the variable becomes null.


23. Name the containers which uses Border Layout as their default layout?

By: Karthik : 2012-06-16

Description: Answer: Containers which uses Border Layout as their default are: window, Frame and Dialog classes.


24. What do you understand by Synchronization?

By: Karthik : 2012-06-16

Description: Answer: Containers which uses Border Layout as their default are: window, Frame and Dialog classes.


25. What is Collection API?

By: Karthik : 2012-06-16

Description: Answer: The Collection API is a set of classes and interfaces that support operation on collections of objects. These classes and interfaces are more flexible, more powerful, and more regular than the vectors, arrays, and hashtables if effectively replaces.


26. Is Iterator a Class or Interface? What is its use?

By: Karthik : 2012-06-16

Description: Answer: Iterator is an interface which is used to step through the elements of a Collection.


27. What is similarities/difference between an Abstract class and Interface?

By: Karthik : 2012-06-16

Description: Interfaces provide a form of multiple inheritance. A class can extend only one other class.


28. How to define an Abstract class?

By: Karthik : 2012-06-16

Description: Answer: A class containing abstract method is called Abstract class. An Abstract class can't be instantiated.


29. How to define an Interface?

By: Karthik : 2012-06-16

Description: Answer: In Java Interface defines the methods but does not implement them. Interface can include constants. A class that implements the interfaces is bound to implement all the methods defined in Interface.


30. Explain the user defined Exceptions?

By: Karthik : 2012-06-16

Description: Answer: User defined Exceptions are the separate Exception classes defined by the user for specific purposed. An user defined can created by simply sub-classing it to the Exception class. This allows custom exceptions to be generated (using throw) and caught in the same way as normal exceptions.