Java provides he Date class available in java.util.*; packages, this class encapsulates the current date & time.
contructors: Date() , Date(long millisec)
Methods:
boolean after(Date date)
int compareTo(Date date)
boolean equals(Object date)
example:
import java.util.*; public class Date { public static void main(String[] args) { Date date=new Date(); System.out.println(date.toString()); } }
Java Regex
Will work on regex later but it use java.util.regex package for pattern matching with regular expressions