This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes Primitive data types the same as J2SE??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Primitive data types the same as J2SE???" Watch "Primitive data types the same as J2SE???" New topic

Primitive data types the same as J2SE???

George Kalfas

Joined: Aug 05, 2004
Posts: 22
Hey to you all!!

I'm wondering if the primitive types of Java Micro are the same ( in terms of range and byte size ) as traditional java (a.k.a. int 4 bytes, double 8 bytes etc...). I'm talking about the CLDC 1.1 configuration which supports floating points.
I've searched the CLDC documentation and found out that for instance floating data types follow the IEEE 754 configuration which is the same that J2SE follows. To my mind this means that the primitive data types are the same in both J2ME and SE.
Anybody can confirm that???

Thank you all in advance!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17260

Yes, the primitives are the same. Actual internal binary storage may vary, since the CPUs involved are different, but the action at the Java level is identical to the standard JVM for primitives.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Primitive data types the same as J2SE???
jQuery in Action, 3rd edition