Hi Jon,

I have not done any testing on the code but:

On 11 Apr., 08:59, "Jon Carlson" <[email protected]> wrote:
> Hi all,  I seem to be having trouble with the following code for the
> homework.  Does anyone know why I am getting the error?
>
> import java.util.Date;
>
> public class MyCurrentDate extends Thread implements Runnable {
>
>     Date date;
>
>     MyCurrentDate(Date date) {
>
>         date = this.date;

Here, I think, could be a problem. You are assigning to the parameter
variable the value of
the instance variable. I think this should be reversed:

this.date = date;

So that you assign the date given in the constructor to the instance
variable.



HTH
Ewald

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to