It's not a secret anymore!
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes problem of downcast Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "problem of downcast" Watch "problem of downcast" New topic

problem of downcast

David George

Joined: Aug 23, 2005
Posts: 10
I upcast a String[][] to Object,but do not know how to downcast the Object to String[][].
Thank you for your response.Waiting.
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11778

Hi Sheng,

Is this related to your post "how to turn Observable to a String[][]"?

Regards, Andrew
[ August 26, 2005: Message edited by: Andrew Monkhouse ]

The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Jesse Xie Y.S.

Joined: Feb 09, 2004
Posts: 20
Just do it:

String[][] strArray = new String[][]{};
Object obj=strArray;

I agree. Here's the link:
subject: problem of downcast
It's not a secret anymore!