java equals on recursive apache commons

Solutions on MaxInterview for java equals on recursive apache commons by the best coders in the world

showing results for - "java equals on recursive apache commons"
Matteo
05 Mar 2020
1 
2@Test
3public void testRefEqu() throws IOException {
4
5    dummy inst1 = new dummy();
6    inst1.nestedClass = new dummy2();
7    inst1.nestedClass.intVal = 2;
8
9    dummy inst2 = new dummy();
10    inst2.nestedClass = new dummy2();
11    inst2.nestedClass.intVal = 2;
12
13    boolean isEqual1 = EqualsBuilder.reflectionEquals(inst1.nestedClass, inst2.nestedClass);
14    boolean isEqual2 = EqualsBuilder.reflectionEquals(inst1, inst2);
15}
16