2019年4月3日 星期三

[JAVA] System.in 輸入

[JAVA] System.in 輸入

import java.util.Scanner;

public class HelloUser {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("Please input a number: ");
        System.out.printf("Oh! I get %d!!", scanner.nextInt());
    }
}

stdin
10099

輸出畫面
Please input a number: Oh! I get 10099!!


沒有留言:

張貼留言

WOKWI ESP32 模擬RFID ,LED + Python TKinter SQLite

 WOKWI ESP32 模擬RFID ,LED + Python TKinter SQLite  WOKWI ESP32程式 #include <SPI.h> #include <MFRC522.h> #include <WiFi.h> #i...