Data type in java

Write here if you have problems with your Java source code

Moderator: Board moderators

Post Reply
ranacse05
New poster
Posts: 37
Joined: Wed Mar 28, 2007 5:08 pm
Location: Rajshahi
Contact:

Data type in java

Post by ranacse05 »

How long data type can i get in jave ? In c/c++ we get max 64 bit in jave is it possible to use 256 bit or more ?
I like to solve problems.
mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf »

First Google hit -
http://java.sun.com/docs/books/tutorial ... types.html

There's also java.math.* which provides arbitrary-precision integers and decimals, but they're currently not supported at this online judge.
chunyi81
A great helper
Posts: 293
Joined: Sat Jun 21, 2003 4:19 am
Location: Singapore

Post by chunyi81 »

For primitive data types the max you can go in Java is 64 bits for a long (which is 32 bits for C/C++).

There are other types such as BigInteger, BigDecimal, to name a few.
29060SC
New poster
Posts: 1
Joined: Mon Aug 13, 2007 11:16 am

Post by 29060SC »

Hi folks,

Actually, since java.math.BigInteger is not supported by the online judge, one is supposed to implement the arbitrary precision long numbers by itself, right ?

Thanks,
LonSx
mf
Guru
Posts: 1244
Joined: Mon Feb 28, 2005 4:51 am
Location: Zürich, Switzerland
Contact:

Post by mf »

Yes.
Or you can wait until the new server (with full Java 5 support) will finally be ready...
Post Reply

Return to “Java”