Hello agains friend, i do the exercise runnable, but when run the main, nothing
happens, some body knows what is the problems????. Thank you.
package MyMain;
import java.util.Calendar;
import java.util.Date;
/**
*
* @author Mio
*/
public class MyCurrentDate implements Runnable {
Date time;
Thread thread;
String tim;
public MyCurrentDate(){
time = Calendar.getInstance().getTime();
tim = time.toString();
thread = new Thread(this.tim);
thread.start();
}
public void run() {
String timo= thread.getName();
for (int i = 0; i < 10; i++) {
System.out.println(timo);
}
}
}
_________________________________________________________________
Comparte, crea, disfruta… Descubre todo, en estos vídeos
http://www.windowslive.es
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---