File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes How to use Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to use" Watch "How to use" New topic

How to use

James Tharakan
Ranch Hand

Joined: Aug 29, 2008
Posts: 580

I just came across this statement

Object c = new long[4];

How do i use use this .
please explain

Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
Satish Chilukuri
Ranch Hand

Joined: Jun 23, 2005
Posts: 266
An array is a subclass of Object. To use the variable as an array just do cast and use it.
long[] array = (long[])c;
I agree. Here's the link:
subject: How to use
It's not a secret anymore!