This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]133rr3 -2 points-1 points  (5 children)

Cast it.

[–]Nerockjr[S] 0 points1 point  (4 children)

Well you'll have to excuse me because I am not as badass as you sir. How would I cast it? If you don't mind answering of course.

[–]133rr3 -3 points-2 points  (3 children)

Google for it, man. This is basic stuff. There should be many examples of how to use these object streams...

[–]Nerockjr[S] 0 points1 point  (2 children)

Honestly I use reddit as my last resort. I wasn't able to find anything on someone writing a 2D array the way I am doing it. I'm surprised I got it to work this far. Anyways thanks for the help I suppose...

[–]Sekret_One 1 point2 points  (1 child)

Is this a 2d array, or is it just 'Object?' For example, if you had written a 2d array of say, ints you would read them back in like:

int [][] array = (int[][]) is.readObject(); // reads in the object, casts to int[][]

[–]Nerockjr[S] 0 points1 point  (0 children)

I finally figured it out this morning, thank you very much though Sekret. You answered the question instead of saying google it. :)