Is There Vector Support?

Write here if you have problems with your Java source code

Moderator: Board moderators

Post Reply
shuniu
New poster
Posts: 34
Joined: Thu Oct 16, 2003 6:15 pm

Is There Vector Support?

Post by shuniu »

I used Vector in my program and got the following errors:

01992950_24.java:46: Can't find method `add(LB;)' in class `java.util.Vector'.
bs.add(b);
^
01992950_24.java:51: Can't find method `get(I)' in class `java.util.Vector'.
B minB = (B)bs.get(0);
^
Is it because Vector class is not supported in UVA?
Carthage
New poster
Posts: 12
Joined: Wed Oct 29, 2003 8:05 pm

Post by Carthage »

Vector is supported. However, the methods you mentioned are not, so instead of add(), use addElement(). And use elementAt() instead of get().

Cheers!
My ideas on solving programming problems are 91% common sense, practicality and luck, 8% pure knowledge, and 1% extreme Math.
Experimenter
Learning poster
Posts: 76
Joined: Thu Mar 13, 2003 5:12 am
Location: Russia

Post by Experimenter »

Carthage, thanks a lot for your answer, as it helped me as well.
This is so stupid. I can't believe this. The last time I visitied this site was ages ago. And they still were saying this nonsence about being patient regarding java.
Those lazybones cannot lift a finger.
it would be great if you replied this post. really.
little joey
Guru
Posts: 1080
Joined: Thu Dec 19, 2002 7:37 pm

Post by little joey »

Those lazybones are rewriting the system and in the mean time will not upgrade their old.
Anyway, nobody forces you to use this system that is created and maintained by enthousiastic volunteers, so if you don't like it, go away and stay away.
Experimenter
Learning poster
Posts: 76
Joined: Thu Mar 13, 2003 5:12 am
Location: Russia

Post by Experimenter »

little joey wrote:Those lazybones are rewriting the system and in the mean time will not upgrade their old.
Anyway, nobody forces you to use this system that is created and maintained by enthousiastic volunteers, so if you don't like it, go away and stay away.
ye, probably that is all you are left with to say.
Anyway, Joe, just don't be offended. It is just a bit annoying we cannot use the advantages of java language and it seems to be like that for a long time.
it would be great if you replied this post. really.
Experimenter
Learning poster
Posts: 76
Joined: Thu Mar 13, 2003 5:12 am
Location: Russia

Post by Experimenter »

Experimenter wrote:
little joey wrote:Those lazybones are rewriting the system and in the mean time will not upgrade their old.
Anyway, nobody forces you to use this system that is created and maintained by enthousiastic volunteers, so if you don't like it, go away and stay away.
ye, probably that is all you are left with to say.
Anyway, Joe, just don't be offended. It is just a bit annoying we cannot use the advantages of java language and it seems to be like that for a long time.
I come here a year later and the situation is still almost the same. Unbelievable. :-?
it would be great if you replied this post. really.
Darko
Guru
Posts: 580
Joined: Fri Nov 11, 2005 9:34 am
Location: Calgary, Canada

Post by Darko »

Well, situation is not exactly the same. They have an experimental server that supposedly runs Java 1.6. I haven't tried it yet, but I did get an invitation the first time they tested it. After I registered I found out that only C/C++ submitions would be accepted, so I gave up. Apparently they ran Java 1.6 test contest later on, but I am not sure how that went. I don't even know why they are quiet about it, I think it is a huge thing. Especially because the new server is located at Baylor, meaning that they are getting a real support from ACM ICPC.
Experimenter
Learning poster
Posts: 76
Joined: Thu Mar 13, 2003 5:12 am
Location: Russia

Post by Experimenter »

Darko wrote:I don't even know why they are quiet about it, I think it is a huge thing.
Well, how huge can it be if I see them saying "be patient, please" for 2 years already? And, in addition, I did not come at the very beginning of them starting saying that.
As they said it is not important to them as any other issues and that is why it is done at a snail's pace.
it would be great if you replied this post. really.
Darko
Guru
Posts: 580
Joined: Fri Nov 11, 2005 9:34 am
Location: Calgary, Canada

Post by Darko »

I just submitted a solution to a problem in the currently running contest, which contains this line:

Code: Select all

System.out.printf("Case %d: %d\n", tc++, best);
I just hope they switch to the new system completely as soon as possible :)
jan_holmes
Experienced poster
Posts: 136
Joined: Fri Apr 15, 2005 3:47 pm
Location: Singapore
Contact:

Post by jan_holmes »

I just submitted a solution to a problem in the currently running contest, which contains this line:
Code:
System.out.printf("Case %d: %d\n", tc++, best);

I just hope they switch to the new system completely as soon as possible
Did it work ?
Darko
Guru
Posts: 580
Joined: Fri Nov 11, 2005 9:34 am
Location: Calgary, Canada

Post by Darko »

Yes, it did.

I hope you understand that it still does not work on UVa, but it does on their test server? I was kinda disappointed that the last contest didn't run there.
Post Reply

Return to “Java”