Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

map,Hashmap and synchronized

 
kumar Reddy
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
I am new to j2me technology

I would like to know whetehr j2me supports Map and HashMap classes and synchronized keyword..

i have a small doubt.
what i think regardign j2me is that it comprises of few packages of j2se and aditional optional packages for specific devices?

i would like to know what are these set of packages of j2se that are in j2me..where can i find this information..please help me in this regard

seesm to be silly, but i could not understand
Thank you
 
Tomas Conway
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Map: no
HashMap: no
synchronized: yes

The only Collection style classes are Vector, Stack and Hashtable.



That's it bascially, except that there are also differences between the packages and classes that are common to both. E.g. both J2SE and J2ME have a java.lang.String class, but the J2ME version doesn't have all the methods that J2SE has.
 
kumar Reddy
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
thanks for ur reply..meanwhile i was browsing for information regarding this topic and i have found something interesting which is located at

http://java.sun.com/products/cdc/api.html

from the fig in this page its said that
CDC supports the entire package java.util(which has map and hashmap) just like j2se.

so what i understand is that they must be vaild in CDC environoment.please correct me if i am wrong.

thank you
 
Tomas Conway
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pardon me, I was assuming CLDC not CDC.

Yes, CDC has a much less restricted subset of J2SE, and does indeed include Map and HashMap.

You can find the API for CDC here.
 
kumar Reddy
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi tomas

anyhow thank you for your replies..
and also forgivng a link to api of cdc.

and do u know something that CDC have JVMPI from cdc1.0.1 any idea?

thank you
 
Alexander Traud
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although it is CDC here, but if you do CLDC and really, really need the Collection package: Sun InfoBus.
This gives the Collection API. Never tried in J2ME but it should work if you have enough heap.
[ November 27, 2004: Message edited by: Alexander Traud ]
 
Tomas Conway
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


That package extends J2SE classes that are not included in J2ME. In any case packages cannot be installed unless they are part of the your code in the first place. I.e. you would need the full source, and it would have to be entirely in Java (no native code).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic