And this code works perfectly well, which means that i can put a honda in car reference and then cast it and put it in another honda reference. But if i do the same thing with Array it does not work . i get a compiler error. so if i change my car tester class like this :
so can anyone tell me whether casting is possible with arrays? if so then how can i correct my code ?
saima.
SCJP 6.0 (86%) SCWCD 5 (94%)
Rok Ć telcer
Ranch Hand
Joined: Nov 03, 2009
Posts: 101
posted
0
Hi,
saima kanwal wrote:
so can anyone tell me whether casting is possible with arrays?
Sure it is.
saima kanwal wrote: if so then how can i correct my code ?
Change the following line:
to
Regards,
Rok
SCJP, SCWCD
saima kanwal
Ranch Hand
Joined: Oct 05, 2009
Posts: 148
posted
0
Thanks Rok.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.