This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
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