File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help with these errors

 
John Walker
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
chi Lin
Ranch Hand
Posts: 348
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
John Walker
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for all of the help, I got it to work. And yes this my real name thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic