Iam not sure what will be the effect of doing the foll:
Servlet spawns off a
thread and passes on parameters a2,b2,c2. Inside this thread I have member variables.
public class A extends Thread
String a;
String b;
String c;
{
public A(a1,b1,c1)
{
this.a = a1;
this.b = b1;
this.c = c1;
}
}
Is this thread safe? Iam confused.
Generally, by declaring member variables, each instance has its own copy and dont share it isnt? What about the above scenario?