I only want to know a question. If I have a class like this:

public class Example
{
    ArrayList<String> vector;

    public Example singleton = new Example();
    
    private Example()
    {
        //Read data from BD and fill the vector. Example vector:  
["foo","voo","faa","vuu","vee"]
    }    

    public synchronized removeElement()
    {
        vector.remove(0);
    }

    public synchronized changeElement()
    {
        vector.set(0,"fii");
    }
}

If there are multiple instances running and one of them executes the method 
removeElement? What happens with the values of the other instance? And if 
one of them executes the method changeElement?

Thanks a lot.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/zJJkwWQBuwoJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to