Sunday 1 February 2015

Latest Java Beans interview questions and answers in pdf (Part5)

41. 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.
Themost common causes for this problem are either forgetting to include a "package a;" statement or having a "package" statement with the wrong name.

42. What is the relationship between Sun s JFCs and JavaBeans?
The JFC (Java Foundation Classes) is based upon the AWT (Abstract Windowing Toolkit), which has been part of the Java platform from the beginning. JFC effectively adds a richer set of visual elements for building JavaBeans components and applications. See the JFC web site for more information.

43. 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.

44. Are there JavaBeans components available that I can buy today?
Yes. A large number of companies, both large and small, have announced their plans to deliver JavaBeans-based products.

45. 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're very pleased to see the tools community swiftly embracing JavaBeans by announcing support for JavaBeans in their visual application builder tools.

46. 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.

47. Is JavaBeans a complete component architecture?
JavaBeans is a complete component model. It supports the standard component architecture features of properties, events, methods, and persistence. In addition, JavaBeans provides support for introspection (to allow automatic analysis of a JavaBeanscomponent) and customization (to make it easy to configure a JavaBeans component).

48. 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.

49. What is a Bean? Why is not a Bean an Applet?
JavaBeans components, or Beans, are reusable software components that can be manipulated visually in a builder tool. Beans can be combined to create traditional applications, or their smaller web-oriented brethren, applets. In addition, applets can be designed to work as reusable Beans.
Individual Beans will function quite differently, but typical unifying features that distinguish a Bean are:
? Introspection: enables a builder tool to analyze how a Bean works
? Customization: enables a developer to use an app builder tool to customize the appearance and behavior of a Bean
? Events: enables Beans to communicate and connect together
? Properties: enable developers to customize and program with Beans
? Persistence: enables developers to customize Beans in an app builder, and then retrieve those Beans, with customized features intact, for future use.

50. Difference between java bean and bean?
A Java Bean is a software component written in the Java programming language that conforms to the JavaBeans component specification. The JavaBeans APIs became part of the "core" Java APIs as of the 1.1 release of the JDK.
The JavaBeans specification defines a Java-based software component model that adds a number of features to the Java programming language.
Some of these features include:
? introspection
? customization
? events
? properties
? persistence
Enterprise JavaBeans (EJBs) are Java-based software components that are built to comply with Java's EJB specification and run inside of an EJB container supplied by a J2EE provider. An EJB container provides distributed application functionality such as transaction support, persistence and lifecycle management for the EJBs.
More Questions & Answers :-
Part1  Part2  Part3  Part4  Part5  Part6

No comments:

Post a Comment