Skip to content

Instantly share code, notes, and snippets.

@tmountain
Created March 3, 2010 19:38
Show Gist options
  • Save tmountain/320929 to your computer and use it in GitHub Desktop.
Save tmountain/320929 to your computer and use it in GitHub Desktop.
public class T {
public static void main(String[] args) {
int x = 3;
final Object[] foo = { x };
Thread t = new Thread(new Runnable() {
public void run() {
System.out.println(String.valueOf(foo[0]));
}
});
t.start();
try {
Thread.sleep(1000);
} catch (InterruptedException e) { }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment