File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes returning an int Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "returning an int" Watch "returning an int" New topic

returning an int

Roberto Favaro

Joined: Mar 23, 2004
Posts: 24
This is a problem im having.Im trying to enter an id in HTML and return its details.I cant seem to compile my code correctly but I cant see how I can fiv it .Im lost

My bussiness class

my Product DAO class

My business class *This wont compile correctly*

Any help would be greatly appreciated.Even if someone could point me in the right direction.Tnx
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

What's the error message, and which line does the compiler point to?
Roberto Favaro

Joined: Mar 23, 2004
Posts: 24
Sorry....Its pointing to the line in

Heres the error

Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
I see that you have casting problem.
It is because you want to pass String object into method with integer argument.

You can change with this one

Correct me if I am wrong..
Hope this help

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63867

Moving to Java in General (intermediate)

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: returning an int
It's not a secret anymore!