aspose file tools*
The moose likes Java in General and the fly likes What is wrong with this code? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "What is wrong with this code?" Watch "What is wrong with this code?" New topic
Author

What is wrong with this code?

Derek McDonald
Greenhorn

Joined: Sep 28, 2004
Posts: 3
Ok

I am not having the best of days and I don't want to see any more errors.

Compiler Output

Code Where Errors are Located


Class being stored in the vectors elements
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
The get() method of the Vector class returns an instance of class Object, you will need to cast this into an instance of Record before you call the getValue() method of the Record class.
Derek McDonald
Greenhorn

Joined: Sep 28, 2004
Posts: 3
how would I be able to do that???
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
Along the lines of
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Is this a class assigment where you have to write your own sort routine? If so, then ignore the rest of my message. However, if you aren't required to write this routine, you should use Collections.sort() instead.

Layne


Java API Documentation
The Java Tutorial
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is wrong with this code?