0

java Online Quiz - 10

Description: java Online Quiz - 10
Number of Questions: 18
Created by:
Tags: java
Attempted 0/18 Correct 0 Score 0
  1. Entity bean data survives crashes.

  2. An entity bean represents non-persistent data.

  3. It creates its own JAR file during deployment.

  4. You get authentication code without having to write any.


Correct Option: A

When do you use a session bean?

  1. When you want to be certain your application data persists between program invocations, even in the event of a crash.

  2. If you need to initiate a database transaction.

  3. To process transient data that can be re-created in the event of a crash.

  4. To keep people who do not know how to program from accidentally changing important logic code


Correct Option: C
  1. To make the user interface more interesting.

  2. To simplify application deployment.

  3. To prevent malicious programs from gaining access to sensitive information on your database server.

  4. To make the application much easier to update, maintain, and manage.


Correct Option: D

Why is XML a good way to transfer text-based data from one program or tool to another?

  1. XML imposes important limitations on the receiving program or tool.

  2. The receiving program or tool can use the XML tagging information to determine how to best handle the incoming data.

  3. XML tags offer an extra level of security

  4. XML tags specify to the receiving program or tool exactly how to format and display the data.


Correct Option: B

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) XML imposes important limitations on the receiving program or tool - This option is incorrect because XML does not impose limitations on the receiving program or tool. XML is a flexible data format that can be used in a wide range of applications.

Option B) The receiving program or tool can use the XML tagging information to determine how to best handle the incoming data - This option is correct. XML uses tags to structure and describe the data, allowing the receiving program or tool to understand the meaning and purpose of each element. This enables the receiving program or tool to process the data appropriately based on the tag information.

Option C) XML tags offer an extra level of security - This option is incorrect. XML tags do not provide any inherent security features. Security in data transfer is typically handled through encryption, authentication, and access control mechanisms.

Option D) XML tags specify to the receiving program or tool exactly how to format and display the data - This option is incorrect. XML tags define the structure and meaning of the data, but they do not dictate how the data should be formatted or displayed. Formatting and display are typically handled by the receiving program or tool based on its own rules and user preferences.

The correct answer is B) The receiving program or tool can use the XML tagging information to determine how to best handle the incoming data. This option is correct because XML tags provide valuable metadata that helps the receiving program or tool understand and process the data effectively.

Therefore, the correct answer is B) The receiving program or tool can use the XML tagging information to determine how to best handle the incoming data.

What part of the J2EE platform handles data storage and retrieval on behalf of a container-managed entity bean?

  1. The thin client.

  2. Deployment descriptors.

  3. The JAR file.

  4. The bean's container


Correct Option: D

What is bean-managed persistence?

  1. When you implement entity or session bean methods to use SQL commands you provide.

  2. When the bean's container handles data storage and retrieval.

  3. When the J2EE server is never shut down

  4. When changes to database data are lost during a crash.


Correct Option: A

AI Explanation

To answer this question, we need to understand the concept of bean-managed persistence in J2EE (Java 2 Enterprise Edition).

Bean-managed persistence refers to the approach where the developer explicitly implements entity or session bean methods to handle the storage and retrieval of data using SQL commands. In this approach, the responsibility of managing the data storage and retrieval is placed on the developer, rather than the bean's container.

Let's go through each option to understand why it is correct or incorrect:

Option A) When you implement entity or session bean methods to use SQL commands you provide - This option is correct because it accurately describes bean-managed persistence. In this approach, the developer is responsible for implementing the necessary SQL commands to handle data storage and retrieval.

Option B) When the bean's container handles data storage and retrieval - This option is incorrect. In bean-managed persistence, the container does not handle data storage and retrieval. It is the developer's responsibility to implement the necessary logic for handling data using SQL commands.

Option C) When the J2EE server is never shut down - This option is incorrect. Bean-managed persistence is not dependent on the J2EE server being continuously running. It is a design approach for handling data storage and retrieval within the J2EE application.

Option D) When changes to database data are lost during a crash - This option is incorrect. Bean-managed persistence does not necessarily imply that changes to database data will be lost during a crash. The data handling and persistence strategy can be implemented in a way that ensures data integrity and recovery.

Therefore, the correct answer is A) When you implement entity or session bean methods to use SQL commands you provide. This option accurately describes the concept of bean-managed persistence, where the developer is responsible for implementing the necessary SQL commands to handle data storage and retrieval.

How are life cycle methods called?

  1. By thin clients.

  2. By calls to the database.

  3. By the J2EE server.

  4. By the bean's container.


Correct Option: C

In a multitiered application, which tier is the browser in?

  1. First tier.

  2. Second tier.

  3. Third tier.

  4. Fourth tier


Correct Option: A

Which of the following is true of cloud computing?

  1. It's always going to be less expensive and more secure than local computing.

  2. You can access your data from any computer in the world as long as you have an Internet connection.

  3. Only a few small companies are investing in the technology, making it a risky venture.

  4. none of these


Correct Option: B

What is private cloud?

  1. A standard cloud service offered via the Internet

  2. A cloud architecture maintained within an enterprise data center.

  3. A cloud service inaccessible to anyone but the cultural elite

  4. none of these


Correct Option: B

What is the output of the program?

  1. 13

  2. 15

  3. 0

  4. Compiler error


Correct Option: D

which is the first web browser developed in java

  1. internet explorer

  2. Netscape Navigator

  3. Hotjava

  4. Opera


Correct Option: D

AI Explanation

To answer this question, we need to understand the development of web browsers and their history.

Option A) Internet Explorer - Internet Explorer was not the first web browser developed in Java. It was developed by Microsoft and primarily used the C++ programming language.

Option B) Netscape Navigator - Netscape Navigator was not the first web browser developed in Java. It was developed by Netscape Communications Corporation and initially written in C and C++ programming languages.

Option C) Hotjava - Hotjava was the first web browser developed in Java. It was a project by Sun Microsystems and released in 1995. Hotjava was a significant development as it showcased the capabilities of the Java programming language in creating cross-platform applications.

Option D) Opera - Opera was not the first web browser developed in Java. It was developed by Opera Software and primarily used the C++ programming language.

The correct answer is Option C) Hotjava. This option is correct because Hotjava was the first web browser developed in Java.

what is the output of the following program

  1. 0

  2. -1

  3. -2

  4. compiler error


Correct Option: C

Which of the following java doesnt support?

  1. signed number

  2. unsigned number

  3. signed right shift

  4. unsigned left shift


Correct Option: B

what does the symbol means in java?

  1. logical NOT

  2. logical OR

  3. logical AND

  4. logical XOR


Correct Option: A

­­_______ is the ability to do multiple tasks at the same time

  1. multithreading

  2. multitasking

  3. multiprograming

  4. multiprocessing


Correct Option: A

_________ defines how the component will be arranged in the container

  1. layout manager

  2. outline manager

  3. component design

  4. component manager


Correct Option: A
- Hide questions