File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Help with these errors

John Walker

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

Joined: Jan 10, 2002
Posts: 63862

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.

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

Joined: Aug 24, 2001
Posts: 348
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

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

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:
subject: Help with these errors
It's not a secret anymore!