How do I get the current date and time in Java?
I am looking for something that is equivalent to DateTime.Now from C#.
DateTime.Now
import java.util.Date; Date now = new Date();
Note that the Date object is mutable and if you want to do anything sophisticated, use jodatime.