posted 21 years ago
The error happens because the variables x, y and z exist only inside the static block. Once the program leaves that block and starts the main method the variables are no longer acessible. If you want to access them from the main, do this:
hope it helps,
Francisco
Francisco<br />SCJP<br />please use the [code][/code] tags when showing code.Click <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=ubb_code_page" target="_blank">here</a> to see an example.