clone() публичный Метод

public clone ( ) : Date
Результат Date
Пример #1
0
 public void test_Date_clone()
 {
     Date date = new Date(2005,12,30,12,15,45,1,2,0);
       assertTrue( date.getMonth() == 12 );
       assertTrue( date.getSecond() == 45 );
       Date date2 = (Date) date.clone();
       assertTrue( date2.getMonth() == 12 );
       assertTrue( date2.getSecond() == 45 );
       date2 = null;
       date = null;
 }