瀏覽代碼

ScannerFile

Jose Bedolla 6 年之前
父節點
當前提交
bc4e941763
共有 3 個檔案被更改,包括 3 行新增0 行删除
  1. 二進制
      .DS_Store
  2. 二進制
      CodeSamples/.DS_Store
  3. 3
    0
      JoseB.md

二進制
.DS_Store 查看文件


二進制
CodeSamples/.DS_Store 查看文件


+ 3
- 0
JoseB.md 查看文件

@@ -0,0 +1,3 @@
1
+In this program, the name of a user was taken as an input, stored into a string, then printed it to the screen greeting the user.
2
+Scanner is a tool which allows us to take a value from the user. Scanner s = new Scanner(System.in);, that is the way to define it and to be able to use it. Depending on what the user is inputing, you could assign a variable to what the input will be; integer: int i = s.nextInt();, this is a good example for an integer.
3
+Scanner can be used by importing java.util.Scanner;