Last active
August 20, 2018 08:38
-
-
Save donchan922/903e0fd69cea1e7b488377e8d8a0db92 to your computer and use it in GitHub Desktop.
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
import java.util.Scanner; | |
public class ScannerExample { | |
public static void main (String[] args) { | |
// System.in -> キーボード入力を受け付けるための引数 | |
Scanner scanner = new Scanner(System.in); | |
System.out.print("名前を入力してください:"); | |
// キーボード入力を受け付ける | |
String name = scanner.next(); | |
System.out.println("こんにちは、" + name + "さん"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment