This Java code defines a Demo class with a static integer field x initialized to 5 and a main method that declares a local integer x initialized to 10, prints the local x to the console, then prints the static x to the console.
This Java code defines a Demo class with a static integer field x initialized to 5 and a main method that declares a local integer x initialized to 10, prints the local x to the console, then prints the static x to the console.
This Java code defines a Demo class with a static integer field x initialized to 5 and a main method that declares a local integer x initialized to 10, prints the local x to the console, then prints the static x to the console.