4.Create a Java program to access the java.util.Date class through import keyword and print the current date of the system but inherit the Date class.
💡Code:
class Date {
public static void main(String args[]){
java.util.Date date=new java.util.Date();
System.out.println(date);
}
}
📸Output :