質問編集履歴
3
2222222
test
CHANGED
File without changes
|
test
CHANGED
@@ -41,3 +41,23 @@
|
|
41
41
|
上記のコードをどのようにしたら1桁目のみを並べるためのメソッドを作成できるか教えて
|
42
42
|
|
43
43
|
いただきたいです。
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
```Java
|
48
|
+
|
49
|
+
private String hairetsuNo(String inData){
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
//inData"13","23","45","78","65","123"(受けた配列)
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
return "3","3","5","8","5","3" //結果は1桁のみ並べた配列を返したい
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
```
|
2
111444
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,7 +24,7 @@
|
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
-
return ch01;
|
27
|
+
return String ch01;
|
28
28
|
|
29
29
|
|
30
30
|
|
1
11
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,11 +20,11 @@
|
|
20
20
|
|
21
21
|
char []ch = inData.toString(); //受けた値
|
22
22
|
|
23
|
-
char []ch01 =
|
23
|
+
char []ch01 = new Char[]; //1桁目のみを並べるための配列
|
24
24
|
|
25
25
|
|
26
26
|
|
27
|
-
|
27
|
+
return ch01;
|
28
28
|
|
29
29
|
|
30
30
|
|