Re: beginner to Java



Fields declared in a class, on the same 'level' as methods, are visible
in each method of that class.
(Exception: non-static fields are not visible from static methods).
Local vars are just that, locally visible, in a (method) block from the
point of declaration up to the closing bracket, they're gone after the
closing bracket.

In a switch, 'default' means : all other cases than the ones stated
above.

--------------------
Paul Hamaker, SEMM, teaching ICT since 1987
http://javalessons.com

.