Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
// Dates.java
package com.nkl;
import java.util.Date;
import java.text.Format;
import java.text.SimpleDateFormat;
public class Dates {
public static void main(String[] args) {
Date today = new Date();
String[] s = {
"dd/MM/yy",
"dd-MMMM-yyyy"
};
Format f;
for(int i = 0; i < s.length ; i++) {
f = new SimpleDateFormat(s[i]);
System.out.println(f.format(today));
}
}
}
format=="dd/mm/yy"
"dd/mm/yy".equals(format)