i have two java files file1 and file2 as follows in package pak
file1:
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);
}
}
}
file 2:
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);
}
}
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 ??????