Sorry... must be a very easy question... otherwise I would't be a real
Android Beginner... :-)

How to share the variable pippo between the program that launches the
thread and the thread itself?

@Override
public void onCreate() {
        super.onCreate();
        int pippo = 5;
        new Timer().scheduleAtFixedRate(new TimerTask() {
                public void run() {pippo;
        };};},0,1000);

This is the result of the compiler...

"Cannot refer to a non-final variable pippo inside an inner class
defined in a different method."

Many thanks in advance.
Regards

Android Beginner

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
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/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to