Skip to content

Instantly share code, notes, and snippets.

@draliatas
Created June 15, 2014 20:05
Show Gist options
  • Select an option

  • Save draliatas/a0e1bd7b56790c52b6a7 to your computer and use it in GitHub Desktop.

Select an option

Save draliatas/a0e1bd7b56790c52b6a7 to your computer and use it in GitHub Desktop.
public static void main(String[] args) {
Runnable r = () -> {
for(int s=0; s<1000_000; s++){
System.out.println("count ali : " + s);
};
};
Runnable r2 = () -> {
for(int s=0; s<1000_000; s++){
System.out.println("count veli : " + s);
};
};
Thread t = new Thread(r);
t.start();
Thread t2 = new Thread(r2);
t2.start();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment