Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Write implements Runnable {
- write() {
- new Thread(this).start();
- }
- public void run() {
- while(true) {
- System.out.print("meow");
- try {
- Thread.sleep(1000);
- }
- catch (Exception e) {
- }
- }
- }
- }
- public class Main {
- public static void main(String[] args) {
- new Write();
- Scanner s = new Scanner(System.in);
- while (true) {
- String st = s.next();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment