Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.11 seconds.

  1. Re: Variable might not have been initialized

    It's a pretty common mistake. For more information, default values (or lack thereof) are covered in the basic tutorials: Primitive Data Types (The Java™ Tutorials > Learning the Java Language >...
  2. Re: Variable might not have been initialized

    No, like I said, local variables do not have a default value, including null. If you want the default value to be null, you have to set it as such.



    If that code works correctly, then you have...
  3. Re: Variable might not have been initialized

    I know. I'm telling you what the error message means. I actually don't think any of your code compiles.
  4. Re: Variable might not have been initialized

    Stick with your original code. The error is happening because local variables do not have a default value. So what should the method return if employeeList is empty?
Results 1 to 4 of 4