J
jagadesh
Hi Guys ,
Iam working with an DataBase Type of application. in every table is
store to database , i have 2 fields like
Created and Updated which takes calendar instances . so i used to
write like this
data.setCreated(Calendar.getInstance());
data.setUpdated(Calendar.getInstance());
iam creating a seperate instance of calendar for every created and
updated.
so i made a helper class in which i have a method like this ,
private static Calendar todaycalendar=Calendar.getInstance();
public static Calendar getCalendar(){
System.out.println(todaycalendar);
return todaycalendar;
}
i would have only one isntance right , now i would use this method
for Created and updated.
Now my question is does i would get a seperate Calendar instance for
every time i call the method.
Iam working with an DataBase Type of application. in every table is
store to database , i have 2 fields like
Created and Updated which takes calendar instances . so i used to
write like this
data.setCreated(Calendar.getInstance());
data.setUpdated(Calendar.getInstance());
iam creating a seperate instance of calendar for every created and
updated.
so i made a helper class in which i have a method like this ,
private static Calendar todaycalendar=Calendar.getInstance();
public static Calendar getCalendar(){
System.out.println(todaycalendar);
return todaycalendar;
}
i would have only one isntance right , now i would use this method
for Created and updated.
Now my question is does i would get a seperate Calendar instance for
every time i call the method.