java how to get current time

java how to get current time
re‮ref‬ to:lautturi.com
/**
 * @author lautturi.com
 * Java example:  get current time in java using Calendar
 */

import java.util.*;
import java.util.Calendar;

public class Lautturi {

	public static void main(String[] args) {

		
		Date currentTime = Calendar.getInstance().getTime();
		System.out.println(currentTime);

	}
}

output:

Tue Nov 15 13:14:40 CST 2020
Created Time:2017-09-12 00:15:27  Author:lautturi