Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.j256;
- public class Foo {
- public static void main(String[] args) {
- new Thread(new Runnable() {
- @Override
- public void run() {
- while (true) {
- System.out.println("...");
- try {
- Thread.sleep(1000);
- } catch (InterruptedException e) {
- e.printStackTrace();
- }
- }
- }
- }).start();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement