Author |
Message |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Thu Feb 27, 2003 2:34 pm Post maybe stupid Post subject: Faking struct in Java |
 |
|
|
|
I've had a go at this and it doesn't work for me when I try and make an array of..hmm..objects? e.g.
customTypeClass[] custom = new customTypeClass[1]; //OK
custom[0].whatever = whatever; //NullPointerException
Incase anyone actually wants to help me
javastruct.zip - 0.46 KB
File downloaded or viewed 15 time(s)
|
|
Back to top |
|
 |
Dr Brain Flip-flopping like a wind surfer

Age:39 Gender: Joined: Dec 01 2002 Posts: 3502 Location: Hyperspace Offline
|
Posted: Thu Feb 27, 2003 4:24 pm Post maybe stupid Post subject: |
 |
|
|
|
you never put a object into the array.
put this at the top of main()
tt[0] = new testType(); _________________ Hyperspace Owner
Smong> so long as 99% deaths feel lame it will always be hyperspace to me
|
|
Back to top |
|
 |
|