Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

intValue - ")" Expected or Cannot Resolve Symbol

 
Daniel Gee
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9063
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Satish Chilukuri
Ranch Hand
Posts: 266
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shouldn't it be



Assuming you haven't written your own method with this siganture
 
Steve Morrow
Ranch Hand
Posts: 657
Clojure Spring VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shouldn't it be...

Yep.

http://forum.java.sun.com/thread.jspa?threadID=656103
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic