File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes intValue - Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "intValue - ")" Expected or Cannot Resolve Symbol" Watch "intValue - ")" Expected or Cannot Resolve Symbol" New topic

intValue - ")" Expected or Cannot Resolve Symbol

Daniel Gee
Ranch Hand

Joined: Aug 29, 2003
Posts: 202
I used intValue to convert an Integer to primitive (see below) and ran into syntax errors.

the row.get( "LOG_PID" ) gets the value of the column "LOG_PID" from a database table and returns an object. Therefore, I first cast the object to Integer and then try to use the intValue to convert it to a primitive int.

But, the statement resulted in compilation error: ")" expected.

When I modified the statement a little bit by adding a pair of parenthesis:

I got "Cannot Resolve Symbol: intValue". I have import java.lang.Integer in the beginning of the class.
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9059
Count the opening vs the closing parens in the line above the line displaying the error. When you see a compiler syntax error, you may need to look at the line previous to the one the compiler thinks the error is in.

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Satish Chilukuri
Ranch Hand

Joined: Jun 23, 2005
Posts: 266
Shouldn't it be

Assuming you haven't written your own method with this siganture
Steve Morrow
Ranch Hand

Joined: May 22, 2003
Posts: 657

Shouldn't it be...

I agree. Here's the link:
subject: intValue - ")" Expected or Cannot Resolve Symbol
It's not a secret anymore!