• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Calender problem

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Could you please paste the code, where the references are exactly affecting each other, so that it gets easy to find a solution ?
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I made this test and the instances seems to work independently...
 
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let it be :
Calendar calendar = new GregorianCalendar();
Calendar calendar1 = new GregorianCalendar1();

with GregorianCalendar1() same as GregorianCalendar() try it...
 
Ranch Hand
Posts: 1252
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic