Data matrix code is omnidirectional 2D barcode defined by an L-shaped pattern at one side of the code along with solid border at two adjacent sides. In specific use cases, you may need to create a Data Matrix code with a variety of encoding types. This article explains how to generate a Data Matrix Code programmatically in Java.