J
Jerry
What is the difference between instance variable and local variable? Is
that true instance variables are shared among threads while local
variable is not shared?
public class Test
{
private String var1; // is this instance variable?
public int var2; // is this also instance variable?
private void method1()
{
String var3; // is this local variable?
}
}
Thanks a lot!
that true instance variables are shared among threads while local
variable is not shared?
public class Test
{
private String var1; // is this instance variable?
public int var2; // is this also instance variable?
private void method1()
{
String var3; // is this local variable?
}
}
Thanks a lot!