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 not compiling class with abstract class ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "not compiling class with abstract class ?" Watch "not compiling class with abstract class ?" New topic
Author

not compiling class with abstract class ?

Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
hi

i'm trying to do the following - basically get a fieldname from the columnbean, store it as string and put its value into variable x, then make this value a parameter of the getBlobAddNameBean method



i'm getting the following errors though



the thing is columnbean is not abstract according to the api



so how come its saying it is, whats invalid about the method declaration ?

cheers

chris


One day all greenhorns will run free ...
Tony Jackson
Ranch Hand

Joined: Feb 23, 2001
Posts: 45
Chris,

Maybe i'm missing something here, but it looks like you left out the return type:
public getBlobAddNameBean(String x);
should be
public void getBlobAddNameBean...

also,
is this an abstract class? If so, you omitted the word abstract from the class declaration. If it is not an abstract class, then you cannot have the semicolon at the end of the method signature above; instead you need curly braces and a class definition.

Tony
Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
no its not abstract - i've changed tot eh following from // Methods



and i'm getting the following error



i can't see why its doing this as columnbean is not an abstract class and i've already imported it using the import command ??

cheers

chris
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24166
    
  30

The compiler says that the ColumnBean class is abstract. You've shown us all sorts of stuff, but none of it speaks to whether ColumnBean is abstract or not. How about a URL for the Javadoc for this class? How about the source code (or just the class declaration line?)

You're saying it's not abstract, but it apparently is, as that's what the compiler says. We can probably help you figure out how to understand why this is so, but you'll need to provide us some more information.

Chris, if you don't mind my asking, how did you get yourself into this position? Can you afford to take the time to have a step back and attend a Java course -- or read some intro Java books -- and come back to this problem with a little more basic knowledge? You really seem to be biting off way more than you can chew.
[ June 22, 2004: Message edited by: Ernest Friedman-Hill ]

[Jess in Action][AskingGoodQuestions]
Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110
yes, it is abstract - i'd convinced myself it wasn't because it didn't mention it in the javadoc api, i misread the javadoc and it was confirmed when i opened the compiled bean.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: not compiling class with abstract class ?
 
Similar Threads
extending an abstract Item + linking classes
Problem in checkbox
abstract class instantiation
doubts in 4 questions
Invoking methods from constructors