Java Program to Get Yesterday’s Date with Output

By Prem Tiwari in Java Programming. Updated on

In this tutorial, I will share a Java program to get yesterday’s date with an output. Copy the below and execute it with the help of Java compiler and see the output.

In this program, I have used pre-define classes:
1) java.util.Calendar
2) java.text.DateFormat and
3) java.text.SimpleDateFormat

At the end of this tutorial, I shared the output of this Java program. It will print the date in “dd MMM yyyy” format.

Java Program to Get Yesterday’s Date with Output


Yesterday’s date = 12 January 2016

Sharing is caring!

Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.

You might also like:

Tags: , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.