Advertisement

07.20.2008 at 03:00PM PDT, ID: 23580552
[x]
Attachment Details

Compiler complaining about use of 'final'

Asked by DJ_AM_Juicebox in Java Programming Language

Hi,

I'm using JDE, and trying to do:

    final int whatever;
    try {
        whatever = something();
    }
    catch (Exception ex) {
        whatever = -1;
    }

but the compiler keeps saying that 'whatever' may have already been assigned and keeps pointing to the:

    whatever = -1;

line. Shouldn't it be impossible for that to happen?

ThanksStart Free Trial
[+][-]07.20.2008 at 03:04PM PDT, ID: 22047146

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 03:42PM PDT, ID: 22047259

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Java Programming Language
Sign Up Now!
Solution Provided By: CEHJ
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.20.2008 at 03:46PM PDT, ID: 22047271

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 04:53PM PDT, ID: 22047458

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 04:56PM PDT, ID: 22047462

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628