wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Object to int array conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Object to int array conversion" Watch "Object to int array conversion" New topic
Author

Object to int array conversion

Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
HI,

I just write a int[] in the ObjectOutputStream (In Applet) and I have to receive the same in other end(Servlet) using below code




I tried something but this is wrong. Please advive how to recive the same int [] here



Since this is a General Java query am posting this here
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18763
    
  40

Did you try casting it?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
How ? From Object to int []
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19682
    
  20

Any array is an object, so yes, casting to int[] is allowed using (int[]).


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
Consider Paul's rocket mass heater.
 
subject: Object to int array conversion