How can I cast an Object reference to an array reference?

John Mitchell

Pretty much just like any other cast:

myArrayRef = (MyArrayType[]) objectRef;

For more information, check out Section 5.5 of the Java Language Specification.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact