forked from DreamHackers/test
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gaddict
committed
Oct 31, 2014
1 parent
8983baa
commit 516169a
Showing
1 changed file
with
9 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class CallByReference.java { | ||
public class CallByReference { | ||
|
||
public static void main(String[] args) { | ||
System.out.println(111111); | ||
System.out.println(1111112); | ||
fxxk1(); | ||
} | ||
|
||
private static void fxxk1() { | ||
Map<Integer, String> fxxk = new HashMap<Integer, String>(2); | ||
fxxk.put(0, "素晴らしい格納"); | ||
fxxk(fxxk); | ||
Map<Integer, String> viewMap = fxxk(); | ||
int i = 0; | ||
while (i < fxxk.size()) { | ||
System.out.println(fxxk.get(i)); | ||
while (i < viewMap.size()) { | ||
System.out.println(viewMap.get(i)); | ||
System.out.println("foo"); | ||
i++; | ||
} | ||
} | ||
|
||
public static void fxxk(Map<Integer, String> map) { | ||
private static Map<Integer, String> fxxk() { | ||
Map<Integer, String> map = new Map<Integer, String>(); | ||
map.put(0, "fxxk格納"); | ||
map.put(1, "fxxk2格納"); | ||
return map; | ||
} | ||
|
||
} |