FANDOM


Test2

// block-level scope in Java
{
    // first, try to print x to the console
    // compiler error: cannot find symbol: x
    System.out.println(x);
 
    // variable declaration + assignment
    // *would* happen in one statement, no sooner than now
    // ...if it weren't for the compiler error above
    int x = 1;
}

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.