PPT Slide
public void test (String strInput) {
System.out.println (strInput); // line a
System.out.println (strInput); // line b
Then, executing the code fragment:
String strTemp = “original string”;
System.out.println(strTemp); // line c
System.out.println(strTemp); // line d
original string ( from fragment line c )
original string ( from test line a )
new string ( from test line b )
original string ( from fragment line d )