Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package teln;
- import java.io.IOException;
- import java.net.SocketException;
- import java.net.UnknownHostException;
- public final class Main extends Thread {
- public void run() {
- final LoadMUD lm = new LoadMUD();
- final SwingStuff s = new SwingStuff();
- System.out.println("Hello from a thread!");
- new Thread(new Runnable() {
- public void run() {
- try {
- lm.mud();
- } catch (UnknownHostException ex) {
- } catch (SocketException ex) {
- } catch ( IOException | InterruptedException ex) {
- }
- }
- }).start();
- new Thread(new Runnable() {
- public void run() {
- try {
- s.someStuff();
- } catch (UnknownHostException ex) {
- } catch (SocketException ex) {
- } catch ( IOException | InterruptedException ex) {
- }
- }
- }).start();
- }
- public static void main(String[] args) throws UnknownHostException, SocketException, IOException, InterruptedException {
- (new Main()).start();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment