| |
| |
| |
|
Page: 1 2 3 4
Comments:
<0> the *real* type of oa is String[] <1> asdfd: no. <0> String <1> Object[] oa = new Object[1];
<2> Zeek: yeah, so I'm trying to do getComponents() recursively on every object returned <1> new Object[] != new String[] <0> so what is the lesson here <2> Clackwell: Templates are worth the effort, they save you runtime errors <1> asdfd: that the *real* type of the object oa points to is an Object[]. that means you cannot cast it to a String[], because it simply isn't a String[]. <1> Object[] oa = new String[1]; oa[0] = "Hello world"; String[] sa = (String[]) oa; -> no cl*** cast exception. <0> man that is confusing <0> but i follow <0> i guess i was thrown off because litterally anything could go into oa[0] <1> toArray() (the one without an additional parameter) creates an Object[] internally. that is why you cannot cast the reference to anything else without getting a cl*** cast exception. <0> got ya <0> that's very helpful <0> thankyou <1> you are welcome.
<0> makes me wander where else my java skills are lacking <0> :/ <2> hakuna matata <3> Does someone can tell if it's possible to reboot a Windows machine from a JAVA Application? <4> there might be some native library that can do it. <5> toor__: yes <5> toor__: you have to run "shutdown.exe" <3> something like thaht Runtime.getRuntime().exec(command) ??? <5> yes <5> :) <3> alright thx <6> heh <6> shark_, <6> becoming a helper ? :)
Return to
#java or Go to some related
logs:
#AllNiteCafe #AllNiteCafe #linux #AllNiteCafe #gentoo how to learn norsk, nyorsk intelv8 te fut in gura don't go breaking my heart wav VISONIK DAVID 9000
|
|