Hi all...again
its the third post in just two days, but my assignment deadline is approaching and i am at the beggining.
anyhow,
i need to run 2 methods, from different classes as threads.
i have tried more or less everything that i could get my hands on, so i am asking you, my last chance
ok,i have this:
public class HelloClient{
public static void main(String[] args) {
TellClients tell = new TellClients();
ListenMonitors listen= new ListenMonitors();
tell.start();
listen.run(args);
}//main
}//HelloClient class
class ListenMonitors extends Thread
{
public void run(String args[]) {
try{...
...
}
catch{}
}//ListenMonitors
class TellClients extends Thread
{ public void run(String args[]){
try{
} //try
catch (Exception e) {
System.err.println("ERROR: " + e);
e.printStackTrace(System.out);
}
}//main
}//TellClients
i have tried to call run within the methods, from the first class, everything that i could thing of, but nothing, it only run the furst one.
thanks, Ilias
its the third post in just two days, but my assignment deadline is approaching and i am at the beggining.
anyhow,
i need to run 2 methods, from different classes as threads.
i have tried more or less everything that i could get my hands on, so i am asking you, my last chance
ok,i have this:
public class HelloClient{
public static void main(String[] args) {
TellClients tell = new TellClients();
ListenMonitors listen= new ListenMonitors();
tell.start();
listen.run(args);
}//main
}//HelloClient class
class ListenMonitors extends Thread
{
public void run(String args[]) {
try{...
...
}
catch{}
}//ListenMonitors
class TellClients extends Thread
{ public void run(String args[]){
try{
} //try
catch (Exception e) {
System.err.println("ERROR: " + e);
e.printStackTrace(System.out);
}
}//main
}//TellClients
i have tried to call run within the methods, from the first class, everything that i could thing of, but nothing, it only run the furst one.
thanks, Ilias