java static variables
<p>i have two java files  file1 and file2 as follows in package pak </p>

<p>file1:</p>

<pre><code>package pak;
public  class file1 {
  public  static int x=432;

  public static void main(String[]  args){
    System.out.println("y is "+file2.y);
    while(x==432) {
      System.out.println("x is "+file1.x);
    }

  }
}
</code></pre>

<p>file 2:</p>

<pre><code>package pak;
public  class file2 {
  public  static int y=46;
  public static void main(String[]  args){

   System.out.println("x is "+file1.x);
   ++file1.x;
   System.out.println("x is "+file1.x);

  }
}
</code></pre>

<p>i will run first file1 and it will be running and when i run file 2 from another shell  it should increment x value and it should come out of loop in file 1 
can some one pls help me ??????</p>
