0% found this document useful (0 votes)
5 views

Ejercicios JAVA 5,6

Documento con 2 ejercicios practicos de JAVA
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Ejercicios JAVA 5,6

Documento con 2 ejercicios practicos de JAVA
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

5

What is the DTO pattern used for?


To implement the data access layer
To exchange data between processes
To implement the presentation layer.

Explanation:

DTO (Data Transfer Object) Pattern:

A Data Transfer Object is a simple object used to carry data between different
layers or processes in an application.
 Its primary purpose is to encapsulate data in a way that reduces the number of
calls or operations between layers or systems.
Why the other options are incorrect:

1. To implement the data access layer:


a. This is incorrect because DTOs are not directly involved in accessing data.
This is typically handled by repositories or DAOs (Data Access Objects).
2. To implement the presentation layer:
a. This is incorrect because DTOs are not used for implementing UI or the
presentation logic. However, they can be used to pass data to and from
the presentation layer.
6

one
two
three
four
There is no output.
The output is three because the method signature of the main method that is
recognized as the entry point of a Java program is: public static void main(String[]
args)

You might also like