Here’s a simple Java HTTPS client to demonstrate the use of HttpsURLConnection class to print a https URL content and certificate detail.

Access https URL : https://www.google.com/

Output…

That’s it!