Generate QR Code in Java using ZXing library

 QR Code or Quick Response Code is a two dimensional barcode that can be read by modern smartphones and special QR Code scanner devices. Most QR Codes consist of black squares arranged in a square grid on a white backgroundThere are several types of QR codes depending on their symbol size, layout, encoding and structure.

QR Codes can contain data like - simple text, urls, phone numbers, sms, geolocation, email address etc.

How to generate QR Code in Java?

We can easily generate QR codes in Java using Google's ZXing library, as given in below code.

The above code will produce the following QR code image file in the base directory of the project.


Post a Comment