java keyboard entry
Jun 27, 2017 am 11:20 AMKeyboard entry (Java):
1. Guide package
Format
import java.util.Scanner;
Position
. .Create keyboard input object
Format
Scanner sc = new Scanner(System.in);
3. Obtain data through the object
Format
int x = sc.nextInt();
import java.util.Scanner;
class ScannerDemo { public static void main(String[] args) { //创建键盘录入数据对象 Scanner sc = new Scanner(System.in); int x = sc.nextInt(); } }
The above is the detailed content of java keyboard entry. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Break or return from Java 8 stream forEach?
