Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.11 seconds.

  1. Replies
    6
    Views
    2,261

    Re: Nested-If Problem/ Initializing

    Then I guess I don't understand your question. What exactly is the line you're having trouble with? What's the problem? Are you getting an exception? Something else?
  2. Replies
    6
    Views
    2,261

    Re: Nested-If Problem/ Initializing

    Basically, the problem is that Java needs a guarantee that a variable has been initialized before it can use it. So this won't compile:

    int x;

    if(something){
    x = 1;
    }
    ...
Results 1 to 2 of 2