permaculture playing cards*
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "intValue - ")" Expected or Cannot Resolve Symbol" Watch "intValue - ")" Expected or Cannot Resolve Symbol" New topic
Author

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
Sheriff

Joined: Jul 22, 2000
Posts: 9048
    
  10
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.


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

Yep.

http://forum.java.sun.com/thread.jspa?threadID=656103
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: intValue - ")" Expected or Cannot Resolve Symbol