La reponse simple !
Soit Object objects[]
int[] r = new int[objects.length]
for ( int i = 0; i < objects.length; i++)
r[i] = ((Number)objects[i]).intValue()
|---------+---------------------------->
| | "HAREL Anthony" |
| | <anthony.harel@c-|
| | s.fr> |
| | |
| | 04/02/2003 11:07 |
| | Please respond to|
| | java |
| | |
|---------+---------------------------->
>-------------------------------------------------------------------------------------------------------------------------------|
|
|
| To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
|
| cc: (bcc: Dominique Gallot/BRU/MASTERCARD)
|
| Subject: cast Object[] en int[]?
|
>-------------------------------------------------------------------------------------------------------------------------------|
Bonjour,
Une petite question de d�butant, mais bon...
Comment fait-on pour caster un tableau d'objets Object[] en
tableau d'entiers int[]?
Plus exactement j'ai dans une ArrayList un tableau d'Integer
(Integer[ ] ) si j'utilise la methode toArray() d'ArrayList, je
r�cup�re un tableau d'Object, je fais comment pour avoir un
tableau d'int (int[ ])?
Merci
--
_______________________________
Anthony HAREL
mailto:[EMAIL PROTECTED]
_______________________________
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com
**********************************************************************