質問編集履歴

1

2020/04/17 05:41

投稿

korn
korn

スコア7

test CHANGED
File without changes
test CHANGED
@@ -8,17 +8,37 @@
8
8
 
9
9
  public static void main (String[]args){
10
10
 
11
- boolean isMan = isMan(args[1]);
11
+
12
12
 
13
- 必要な処理
13
+ boolean isMan=isMan(args[1]);
14
14
 
15
- }
15
+ if(isMan){
16
16
 
17
- public static boolean is Man(String is Man){
17
+ System.out.println(args[0]+"男")
18
18
 
19
- 必要な処理
19
+ }else{
20
20
 
21
+ System.out.println(args[0]+"女")
22
+
21
- }
23
+ }
24
+
25
+ }
26
+
27
+
28
+
29
+ public static boolean isMan(String isMan){
30
+
31
+ if(???="M"){
32
+
33
+ return true
34
+
35
+ }
36
+
37
+ else{
38
+
39
+ return false
40
+
41
+ }
22
42
 
23
43
  }
24
44
 
@@ -26,6 +46,4 @@
26
46
 
27
47
 
28
48
 
29
- 必要な処理の部分がわかりません。
30
-
31
49
  実行結果は引数が名前 Mの場合は名前と男性を表示、Fの場合は名前と女性を表示したいです。よろしくお願いします。