Variables in Java

Run Settings
LanguageJava
Language Version
Run Command
class Main { public static void main(String[] args) { // set three variables int x = 0; int y = 123; int z = 321; // read the value of x System.out.println("x is: " + x); // change the value of x x = 25; // output the changed value of x System.out.println("x is now: " + x); // update the value of x by reading the values of y and z and adding them together x = y + z; // output the final value for x System.out.println("x is finally: " + x); } }
Editor Settings
Theme
Key bindings
Full width
Lines