Created
July 18, 2013 14:52
-
-
Save shikajiro/6029983 to your computer and use it in GitHub Desktop.
"長男", "次男", "三男"の3つの文字を代入する文字列型の配列を作ってください。
for文を使って、"僕は◯◯です" と3回表示させてください。
◯◯には長男次男三男のいずれかが表示されるようにしてください。*
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
public class HomeWork { | |
public static void main(String[] args) { | |
String[] names = new String[] { "長男", "次男", "三男" }; | |
for (String name : names) { | |
System.out.println("僕は" + name + "です"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment