Search:

Type: Posts; User: Sean4u

Search: Search took 0.10 seconds.

  1. Re: Conditions and 'might not have been initialized' error.

    That's a good question - my guess is that it's that way due to the expense of doing code path analysis for a class against inline code. If you declare a class with an uninitialised public member...
  2. Re: Conditions and 'might not have been initialized' error.

    There's no such thing as a 'final int', only a final variable or a final method. A final method is one that cannot be overridden, not one that guarantees its return value. I'd say javac is defensibly...
  3. Re: Conditions and 'might not have been initialized' error.

    I'm glad you got working code in the end, but your solution is a "belt and braces" kludge. The compiler analyses your code to warn you of routes through your code where your variables may be used...
  4. Re: Conditions and 'might not have been initialized' error.

    It's doing code path analysis. There's a path through your code where you access the value of af and it may not ever have been assigned. Try walking through your code in your mind - you'll soon spot...
Results 1 to 4 of 4