Re: UserDefaults (Java)
Re: UserDefaults (Java)
- Subject: Re: UserDefaults (Java)
- From: Evan Coyne Maloney <email@hidden>
- Date: Thu, 27 Dec 2001 20:24:49 -0500
In general, if you wish to use a Java primitive type (boolean, int, byte,
or any other type that begins with a lowercase letter) in a place that
requires a Java object, you can put the primitive type into its
corresponding wrapper class. For example:
boolean retVal = false;
Boolean retValObj = new Boolean(retVal);
You can use 'retValObj' above anywhere that accepts a java.lang.Object
parameter.
The mapping of primitives to wrapper classes (all in the java.lang package)
is as follows:
byte => Byte
char => Character
short => Short
int => Integer
long => Long
float => Float
double => Double
Evan Coyne Maloney____________________________________________________
The six-legged fire-breathing dog email@hidden