Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 403 Bytes

Ex_1_2_04.md

File metadata and controls

38 lines (27 loc) · 403 Bytes
title date draft tags categories
算法4 Java解答 1.2.04
2019-02-22 07:35:21 +0800
false
JAVA
技术
归档

1.2.04

问题:

What does the following code fragment print?

String string1 = "hello";
String string2 = string1;
string1 = "world";
StdOut.println(string1);
StdOut.println(string2);

分析:

output:

world
hello

参考: