public static void methodA()
{
int x = 5;
methodB(x);
}

public static void methodB(int x)
{
System.out.println("x = " + x);
}