Click here to watch on Youtube:
https://www.youtube.com/watch?v=zNobPgCOAfg&list=UUhwKlOVR041tngjerWxVccw
CalendarDemo.java
Output
Click the below link to download the code:
https://sites.google.com/site/ramj2eev2/java_basics/CalendarDemo_clone.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava_2018/CalendarDemo_clone
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/b1e669f4abac38a0eb65bfeb213dca88c58230cc/BasicJava_2018/CalendarDemo_clone/?at=master
See also:
All JavaEE Videos Playlist
All JavaEE Videos
All JAVA EE Links
Spring Tutorial
Servlets Tutorial
All Design Patterns Links
JDBC Tutorial
Java Collection Framework Tutorial
JAVA Tutorial
Kids Tutorial
Cooking Tutorial
https://www.youtube.com/watch?v=zNobPgCOAfg&list=UUhwKlOVR041tngjerWxVccw
CalendarDemo.java
import java.util.Calendar;
import java.util.GregorianCalendar;
public class CalendarDemo
{
public static void main(String[] args)
{
Calendar cal1 = new GregorianCalendar(2013, 05, 20);
System.out.println("cal1 = " + cal1.getTime());
/*
* Returns:a copy of this object.
*/
Calendar cal2 = (Calendar) cal1.clone();
System.out.println("Cloned cal2 = " + cal2.getTime());
}
}
import java.util.GregorianCalendar;
public class CalendarDemo
{
public static void main(String[] args)
{
Calendar cal1 = new GregorianCalendar(2013, 05, 20);
System.out.println("cal1 = " + cal1.getTime());
/*
* Returns:a copy of this object.
*/
Calendar cal2 = (Calendar) cal1.clone();
System.out.println("Cloned cal2 = " + cal2.getTime());
}
}
Output
cal1 = Thu Jun 20 00:00:00 IST 2013
Cloned cal2 = Thu Jun 20 00:00:00 IST 2013
Cloned cal2 = Thu Jun 20 00:00:00 IST 2013
Click the below link to download the code:
https://sites.google.com/site/ramj2eev2/java_basics/CalendarDemo_clone.zip?attredirects=0&d=1
Github Link:
https://github.com/ramram43210/Java/tree/master/BasicJava_2018/CalendarDemo_clone
Bitbucket Link:
https://bitbucket.org/ramram43210/java/src/b1e669f4abac38a0eb65bfeb213dca88c58230cc/BasicJava_2018/CalendarDemo_clone/?at=master
See also:
No comments:
Post a Comment