Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Klasse1
- public class Client
- {
- protected static boolean isRunning = new Boolean(true); // warum muss das gerade new Boolean (true) heiรen?
- public static void main(String[] args)
- {
- try
- {
- // Code
- Thread t = new Thread(new CheckThread(client));
- t.start();;
- // Code
- isRunning = false;
- t.join();
- // Code
- }
- catch (InterruptedException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- }
- // Klasse2
- public class CheckThread implements Runnable
- {
- // Code
- public void run ()
- {
- try
- {
- // Code
- while (Client.isRunning)
- {
- // Code
- }
- // Code
- }
- catch (Exception ex)
- {
- // Code
- }
- finally
- {
- // Code
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement