File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Help with these errors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Help with these errors " Watch "Help with these errors " New topic
Author

Help with these errors

John Walker
Greenhorn

Joined: Oct 28, 2003
Posts: 9
Here's the code I'm trying to compile.

That's the constructor method, and here's the main:

With that I keep getting the errors:


[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ October 28, 2003: Message edited by: Dirk Schreckmann ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60997
    
  65

The first error would seem to indicate that your addDimes method is defined more than once in your class. And a quick inspection of your code indicates that that is indeed the case. If you actually read the error messages, they usually tell you what the problem is.
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
chi Lin
Ranch Hand

Joined: Aug 24, 2001
Posts: 348
John,
There are some minor problems inside your code
1. extra ";" around method declaration causing it become abstract

2. the addXXX method should has a int parameter count

3. addDimes() was defined twice which one should be addQuarters(int count)
<problem from copy/paste ? >
try to fix these in Purse you should be OK.


not so smart guy still curious to learn new stuff every now and then
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch, John Walker!
Note that you can copy the text from a windows console. To do so, right mouse click on the title bar, go to Edit -> Mark. Highlight the section of text you'd like to copy. Then right mouse click on the title bar again, go to Edit -> Copy and the text contents will be copied to the clipboard.
Now, about that name. Is that your real name? We don't require real names 'round these parts, but we don't let suspiciously fictitious ones slide without comment. Your display name reminds me of a girl and a party in a cornfield outside Frankfurt, Germany. I won't bore you with the details of my story. I'll just ask that you change your display name if it ain't real.
Hope to see you 'round the Ranch!


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
John Walker
Greenhorn

Joined: Oct 28, 2003
Posts: 9
Thanks for all of the help, I got it to work. And yes this my real name thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with these errors