• 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

GreogorianCalendar!? how to work it out

 
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
i'm trying to convert a normal class to a midlet, this class contain an instance of the GregorianCalendar... the j2me classes dont contain GregorianCalendar it only have the interface Calendar (surely i cant create an instance of this class)
is there a way to solve that??
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Isn't there a Calendar.getInstance() method that returns a Calendar? Then you have an instance of an object that is of type Calendar. This allows the phone manufacturer to implement their Calendar version and the getInstance will return that one.

Mark
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at the URL below:

How to display Calendar in mobile device
http://www.java-tips.org/content/view/421/73/
 
omar bili
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
wow getInstance worked, but please can you tell me how was that??
the Calendar is an interface.. what does this function return!?!?
and is it function that exists in a lot of interfaces??
thanks for the help.
Omar
 
reply
    Bookmark Topic Watch Topic
  • New Topic