src/main/java/examples/Consumer.java.
Tutorial
Build Consumer
Next, create the Java consumer application by pasting the following code into a file
Once again, you can compile the code before proceeding by running the following command:
And you should see the following output: