Understandng Objects.deepEquals

Understandng Objects.deepEquals

We understand how equals() method works. There is a more elaborate method deepEquals() which compares in depth details during comparison.
Basic usage is described below. Let us explore more using these as examples.

import java.util.Objects;

public class DeepEquals
{
   public static void main(String args[])
   {
      DeepEquals deepEquals = new DeepEquals();
      deepEquals.proceed();
   }
   
   private void proceed()
   {
      System.out.println(“Objects.deepEquals(1,1): ” + Objects.deepEquals(1,1));
      System.out.println(“Objects.deepEquals(1,2): ” + Objects.deepEquals(1,2));
      System.out.println(“Objects.deepEquals(“abc”,”abc”): ” + Objects.deepEquals(“abc”,”abc”));
      System.out.println(“Objects.deepEquals(“aa”,”ab”): ” + Objects.deepEquals(“aa”,”ab”));
   }
}

/*

Expected output:

[[email protected]]# java DeepEquals
Getting handle of runtime Console
Got handle of runtime Console
You can now use runtimeConsole object to perform actions of your choice on java.io.Console

*/

Share the Post:
data observability

Data Observability Explained

Data is the lifeblood of any successful business, as it is the driving force behind critical decision-making, insight generation, and strategic development. However, due to its intricate nature, ensuring the

Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular