Skip to content

Instantly share code, notes, and snippets.

@mokomokohitsuzi
Last active October 8, 2016 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mokomokohitsuzi/1c6b4972a1881abd053a5fdffc325ac8 to your computer and use it in GitHub Desktop.
Save mokomokohitsuzi/1c6b4972a1881abd053a5fdffc325ac8 to your computer and use it in GitHub Desktop.
新・明解Java入門 演習2-10
import java.util.Scanner;
public class En2_10 {
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
//キーボドからString型で読み込む。
System.out.print("性:");
String sei = stdIn.next();
System.out.print("名:");
String mei = stdIn.next();
System.out.println("こんにちは"+sei+mei+"さん。");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment