aspose file tools*
The moose likes Beginning Java and the fly likes abstract class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "abstract class" Watch "abstract class" New topic
Author

abstract class

Victoria Preston
Ranch Hand

Joined: Feb 03, 2006
Posts: 106
I am having a problem...I have to take a program I have already written and make it abstract. I thought I had it but it won't compile it doesn't like the following code.....

any tips would help
Garrett Rowe
Ranch Hand

Joined: Jan 17, 2006
Posts: 1296
I dont understand why you are instantiating a new Employee in your compareTo method at all.


Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Victoria Preston
Ranch Hand

Joined: Feb 03, 2006
Posts: 106
really....what should it say something like the following...

Garrett Rowe
Ranch Hand

Joined: Jan 17, 2006
Posts: 1296
Originally posted by Victoria Preston:
really....what should it say something like the following...


I believe that will achieve the result you intended, however remember '=' is for assignment and '==' is for comparison.
Garrett Rowe
Ranch Hand

Joined: Jan 17, 2006
Posts: 1296
Looking at this method again, you could actually trim it down to one line
Victoria Preston
Ranch Hand

Joined: Feb 03, 2006
Posts: 106
thanks alot.....that fixed that probelm....severl more to go.
 
Don't get me started about those stupid light bulbs.
 
subject: abstract class