質問編集履歴
1
title
CHANGED
File without changes
|
body
CHANGED
@@ -3,14 +3,23 @@
|
|
3
3
|
|
4
4
|
public class question{
|
5
5
|
public static void main (String[]args){
|
6
|
+
|
6
|
-
|
7
|
+
boolean isMan=isMan(args[1]);
|
7
|
-
|
8
|
+
if(isMan){
|
8
|
-
}
|
9
|
-
|
9
|
+
System.out.println(args[0]+"男")
|
10
|
-
|
10
|
+
}else{
|
11
|
-
|
11
|
+
System.out.println(args[0]+"女")
|
12
12
|
}
|
13
|
+
}
|
13
14
|
|
15
|
+
public static boolean isMan(String isMan){
|
16
|
+
if(???="M"){
|
17
|
+
return true
|
18
|
+
}
|
19
|
+
else{
|
20
|
+
return false
|
21
|
+
}
|
22
|
+
}
|
14
23
|
|
15
|
-
|
24
|
+
|
16
25
|
実行結果は引数が名前 Mの場合は名前と男性を表示、Fの場合は名前と女性を表示したいです。よろしくお願いします。
|