What is the output of trying to compile and run the following code?
(Select one correct answer)
--------------------------------------------------------------------------------
public class Test026
{
static Test026 t = new Test026();
String str;
public static void main(String args[]) {
Test026 t = new Test026();
t.method("0");
}
void method(String str) {
str = str;
System.out.println(str);
System.out.println(t.str);
System.out.println(this.str);
}
}
--------------------------------------------------------------------------------
A: The output is:
0
null
null
B: The output is:
0
0
0
C: The output is:
0
0
null
D: The output is:
0
null
0
This is the code from
www.jiris.com scjp-2
test. I am not understanding this code. plz explain this code anybody. Ans is A