GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes Calender problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Calender problem" Watch "Calender problem" New topic
Author

Calender problem

Shiva Shankar
Ranch Hand

Joined: Dec 07, 2006
Posts: 31
hi friends,

i want to have two calendar in the same problem,i want to perform different action on both the calendar,and it should't affect each other.
i am trying to use folllowing code
Calendar calendar = new GregorianCalendar();
Calendar calendar1 = new GregorianCalendar();

to create two calendar,and i am performing different action but its effecting
each other,how to avoid it

please reply
Divya Shastry
Greenhorn

Joined: Dec 05, 2006
Posts: 11
Hi
Could you please paste the code, where the references are exactly affecting each other, so that it gets easy to find a solution ?
Luciano Mantuaneli
Greenhorn

Joined: Dec 04, 2006
Posts: 13
I made this test and the instances seems to work independently...


[]'s<br />Mantu<br /> <br />Sorry for my poor english...<br /> <br /><i>Time after time we lose sight of the way. Our causes cant see their effects</i> - Neil Peart
Neerav Narielwala
Ranch Hand

Joined: Dec 08, 2006
Posts: 106
Let it be :
Calendar calendar = new GregorianCalendar();
Calendar calendar1 = new GregorianCalendar1();

with GregorianCalendar1() same as GregorianCalendar() try it...


<a href="http://www.java-tips.org/java-tutorials/tutorials/" target="_blank" rel="nofollow">Java Tutorials</a> | <a href="http://www.planet-java.org" target="_blank" rel="nofollow">Java Weblog</a> | <a href="http://computer-engineering.science-tips.org" target="_blank" rel="nofollow">Computing Articles</a>
Shaan Shar
Ranch Hand

Joined: Dec 27, 2005
Posts: 1249

Originally posted by Neerav Narielwala:
Let it be :
Calendar calendar = new GregorianCalendar();
Calendar calendar1 = new GregorianCalendar1();

with GregorianCalendar1() same as GregorianCalendar() try it...


And what is GregorianCalendar1 ??? from where do you get it... or you tryin to make another class as GregorianCalendar1.


The Best way to predict your future is to create it - Every great individual common man
 
GeeCON Prague 2014
 
subject: Calender problem