Why do we create dto in java?



Why do we create dto in java?..

Answer / Anu Sirohi

DTO (Data Transfer Object) is created in Java to transfer data between processes or layers. It simplifies the communication between different parts of an application by providing a lightweight, self-contained object that only contains the necessary data for transfer, without any business logic.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Java Related AllOther Interview Questions

Is jdk a compiler?

1 Answers  


Input :14000 Output : hundred and fourteen thousand.(wrong) Desired output : fourteen hundred thousand.

2 Answers   Sapient,


What is explicit casting?

1 Answers  


public class Dog { private int weight; public int getweight(){ return weight; } public void SetWeight(int newWeight){ if (newWeight > 0){ weight = newWeight; } } } public class TestDog { public static void main(String[] args) { Dog d = new Dog(); System.out.println("Dog d's weight is " + d.getWeight()); d.setWeight(42); System.out.println("Dog d's weight is " + d.getWeight()); d.setweight(-42); System.out.println("Dog d's weight is " + d.getWeight()); } } class dog is compiled but there is an error in class TestDog when compiled and the error is with dot notations. I want to kmow why there is error in testdog class when compiled.

3 Answers  


What are the disadvantages of java sockets?

1 Answers  


How do I run a project in netbeans?

1 Answers  


Is java a framework?

1 Answers  


Which is more secure: java or activex? : java security

1 Answers  


Explain the reason for each keyword of public static void main(string args[])?

1 Answers  


What is war file in java?

1 Answers  


what about jdb and javadoc by example ?

1 Answers   TCS,


Are streams faster than for loops?

1 Answers  


Categories