First, wrap code in code tag next time!
the error:
cause ArrayList add method saves a Object and the get return a Object too.
So when You do it, you have to use a cast
anotherCar = (Car)al.get(0);
or better, use Generics
http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf
good lucky
> Nobody here cares about your urgency.
I care a bit since sometimes its really urgent and I also put the title like that. Anyway I dont think this was urgent anyway.
Urgent may mean "you have 10 minutes to do a whole system and if not you will get fired, your son will go with her mom and you wont be able to work again" so please avoid using THIS KIND OF TITLEEEEEEEEEEEEEEEEEEEEES PLEASEEEEEEEEEEEE! URGENT, HELPPPPP! :) :) :(.
> > Nobody here cares about your urgency.
>
> I care a bit since sometimes its really urgent and I
> also put the title like that. Anyway I dont think
> this was urgent anyway.
> ...
Then you're probably missing out a lot of help from posters that don't even look at a thread which has the word "Urgent" in it.
No one answers this by job, but their willing to help, if you think that those whose doesnt obey you doesnt deserve an aswer, then just dont answer. You can chose which post to answer and which not. You are free to do it, no one will die for you not answering the post but many people will be better if you help them (obeying or not your wishes).
No ones is offendedm killed, raped, hit, kicked for reading "- urgent". Is not like writting ":( HHHEEEEEEEEEEEELLLLLLLLLLLLLLPPPPPPPPPPPP MEEEEEEEEEEEEEE NOWWWWWWWWW :( :( 8=D"
> No one answers this by job, but their willing to
> help, if you think that those whose doesnt obey you
> doesnt deserve an aswer, then just dont answer.
I think those who are rude--for instance, by foisting their urgency off on others, and trying to make their questions seem more important than others'--don't deserve help.
> You
> can chose which post to answer and which not. You are
> free to do it
I know that. I'm also free to inform those people that they're being rude, and I'm also free to encourage others not to help that person.
> the post but many people will be better if you help
> them (obeying or not your wishes).
They'll be better off if they learn proper etiquette and time management skills.
> No ones is offendedm killed, raped, hit, kicked for
> reading "- urgent". Is not like writting ":(
> HHHEEEEEEEEEEEELLLLLLLLLLLLLLPPPPPPPPPPPP
> MEEEEEEEEEEEEEE NOWWWWWWWWW :( :( 8=D"
To me, "urgent" is the same as the other garbage.
> > What if the title was something like:
> >
> > Need a Java program so orbiting satellite does not
> > crash into Earth -- URGENT!
>
> Exactly where is it going to crash? -- I'd want to
> know that first...
It will crash on top of your snack drawer. Is that a big enough fire to light under you? ;-)
> > > What if the title was something like:
> > >
> > > Need a Java program so orbiting satellite does
> not
> > > crash into Earth -- URGENT!
> >
> > Exactly where is it going to crash? -- I'd want to
> > know that first...
>
> It will crash on top of your snack drawer. Is that a
> big enough fire to light under you? ;-)
Schei遝! Guys, this is going to be bigger than Three Mile Island. I'm thinking Al Quaeda is behind this. They want to strip the infidels of their fried pork rinds!
> > Nobody here cares about your urgency.
>
> I care a bit since sometimes its really urgent and I
> also put the title like that. Anyway I dont think
> this was urgent anyway.
>
> Urgent may mean "you have 10 minutes to do a whole
> system and if not you will get fired, your son will
> go with her mom and you wont be able to work again"
> so please avoid using THIS KIND OF
> TITLEEEEEEEEEEEEEEEEEEEEES PLEASEEEEEEEEEEEE! URGENT,
> HELPPPPP! :) :) :(.
Anyone who gets into that situation only survived so long by sheer luck anyway
I need some help guys. I'm trying to think of a project where urgent could actually be a part of. so far the best I could come up with is Emergency Protocol: How urgent is your injury. I was thinking perhaps a Expert System written in java.
Unfortunately that would still be a bad title for a post - anyone else got any clever ideas as to how to make urgent part of the project and not a description of the timeline of the project ?
;-P