package com.valerysamovich.java.trail.basic.variables.primitive;

public class Variables {

    public static void main(String[] args) {
        
        // variables
        int myVariable;
        myVariable = 5;
        myVariable = 10;
        
        // myVariable = myVariable + 1;
        myVariable += 1; 
        
        System.out.println(myVariable);
        
        String hello = "Hello, "; // string 
        String name = "Valery!";
        System.out.println(hello + name);

    }

}

package com.valerysamovich.java.trail.basic.variables.primitive;

public class Variables {

    public static void main(String[] args) {
        
        /*
         * "int"  - primitive data type of java field
         * "gear" - program field
         * "1"    - initial value of field gear
         */
        int gear = 1;
        
        // variables
        int myVariable;
        myVariable = 5;
        myVariable = 10;
        
        // myVariable = myVariable + 1;
        myVariable += 1; 
        
        System.out.println(gear);
        System.out.println(myVariable);
        
        String hello = "Hello, "; // string 
        String name = "Valery!";
        System.out.println(hello + name);

    }

}

Update Primitive Data Types