Primitive Type vs Reference Type in Java

//I am still trying to find ways to add Java format to this post and posts later. But now it’s //still like plain text.


package bi.xiang.dong;
/**
 * Created by user on 2/3/2017.
 */

//primitive data type as parameter
class parameterExplanation1 {
    public static void main(String[] args){
        int x = 5;

        show(x);
        System.out.println("x= " + x);

    }

    public static void show(int x){
        x = 4;
    }

}

//reference type as parameter
class parameterExplanation{
    int x = 5;
    public static void main(String[] args){

        parameterExplanation pe = new parameterExplanation();
        pe.x = 9;
        show(pe);
        System.out.println(pe.x);
    }

    public static void show(parameterExplanation pe){
        pe.x = 513321312;
    }
}