This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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: 60050

Moving to Java in General (intermediate)

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: returning an int
Similar Threads
What is wrong?
Returning a 0 value error
Out of Memory when testing a BMP Bean
data mismatch error