Scope of a variable declared in a method
<p>Is a variable inside the main, a public variable? </p>

<pre><code>    public static void main(String[] args) {
  .........

    for(int i=0;i&lt;threads.length;i++)
        try {
            threads[i].join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

    long time=0; 
    ....
    }
</code></pre>

<p><code>i</code> and <code>time</code> are they both public variables?</p>

<p>Of course if my reasoning is correct, also any variable belonging to a public method should be considered public. Am I right?</p>
