September 04, 2010, 03:10:52 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  Home Help Media Affiliates Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Primitive Data Types  (Read 964 times)
0 Members and 1 Guest are viewing this topic.
The Soul
Member
*

Reputation: 2
Offline Offline
Posts: 12
Referrals: 1

Awards
« on: August 22, 2009, 04:21:59 PM »

Primitive Data Types

byte:
memory: 1 byte, 8 bits
value: numeric
range: -128 to 127

short:
memory: 2 bytes, 16 bits
value: numeric
range: -32,768 to 32,767

int:
memory: 4 bytes, 32 bits
value: numeric
range: -2,147,483,648 to 2,147,483,647

long:
memory: 8 bytes, 64 bits
value: numeric
range: -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

float:
memory: 4 bytes, 32 bits
value: numeric
range: N/A

double:
memory: 8 bytes, 64 bits
value: numeric
range: N/A

boolean:
memory: 1 bit
value: true or false
range: true to false

char:
memory: 2 bytes, 16 bits
value: unicode
range: \u000 to \uffff
Logged
Javaforums.net :: a community about Java software development.
« on: August 22, 2009, 04:21:59 PM »

 Logged
trey
Member
*

Reputation: 0
Offline Offline
Posts: 16
Referrals: 0

Awards
« Reply #1 on: December 07, 2009, 08:43:43 PM »

floats and doubles have a range, they are just ugly, use their wrapper classes' MAX_VALUE field to find them.
Logged
Javaforums.net :: a community about Java software development.
   

 Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
TinyPortal v0.9.8 © Bloc
Valid XHTML 1.0! Valid CSS!
Page created in 0.184 seconds with 33 queries.

Google visited last this page Yesterday at 06:35:46 PM