It's not a secret anymore!
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

not compiling class with abstract class ?

Chris Davies
Ranch Hand

Joined: Feb 26, 2003
Posts: 110

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 ?



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

Joined: Feb 23, 2001
Posts: 45

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...

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.

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 ??


Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

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:
subject: not compiling class with abstract class ?
jQuery in Action, 3rd edition