回答編集履歴
1
コードのデバッグ
test
CHANGED
@@ -24,13 +24,9 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
-
// 文字列ビルダーオブジェクトを用意
|
28
|
-
|
29
|
-
StringBuilder builder = new StringBuilder();
|
30
|
-
|
31
27
|
// 会場IDのハッシュ(連想配列)を用意
|
32
28
|
|
33
|
-
HashMap<String,
|
29
|
+
HashMap<String,Integer> venueIdMap = new venueMap<String,Integer>();
|
34
30
|
|
35
31
|
|
36
32
|
|
@@ -68,7 +64,7 @@
|
|
68
64
|
|
69
65
|
String strData = reader.readLine();
|
70
66
|
|
71
|
-
String[]
|
67
|
+
String[] strItem;
|
72
68
|
|
73
69
|
int userId, venueId, star;
|
74
70
|
|
@@ -76,15 +72,13 @@
|
|
76
72
|
|
77
73
|
while (strData != null){
|
78
74
|
|
79
|
-
builder.append(string + System.getProperty("line.separator"));
|
80
|
-
|
81
75
|
strData = reader.readLine();
|
82
76
|
|
83
|
-
|
77
|
+
strItem = strData.split(" ");
|
84
78
|
|
85
|
-
if (userIdMap.containsKey(str
|
79
|
+
if (userIdMap.containsKey(strItem[0])){
|
86
80
|
|
87
|
-
userId = userIdMap.containsKey(str
|
81
|
+
userId = userIdMap.containsKey(strItem[0]);
|
88
82
|
|
89
83
|
}else{
|
90
84
|
|
@@ -94,9 +88,9 @@
|
|
94
88
|
|
95
89
|
|
96
90
|
|
97
|
-
if (venueIdMap.containsKey(str
|
91
|
+
if (venueIdMap.containsKey(strItem[1])){
|
98
92
|
|
99
|
-
venueId = venueIdMap.containsKey(str
|
93
|
+
venueId = venueIdMap.containsKey(strItem[1]);
|
100
94
|
|
101
95
|
}else{
|
102
96
|
|
@@ -106,7 +100,7 @@
|
|
106
100
|
|
107
101
|
|
108
102
|
|
109
|
-
star = str
|
103
|
+
star = sstrItem[2];
|
110
104
|
|
111
105
|
System.out.println(userId + " " + venueId + " " + star);
|
112
106
|
|