Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to receive and print the information entered by the keyboard in the development of big data

Shulou Source: shulou.com Published: 2022-06-01 02:39:39 10月03日 Update

This article will explain in detail how to receive and print keyboard input information in big data's development. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

Prompt the user for name and age information System.out.println ("Please enter name and age:")

Create a scanner to scan keyboard input. System.in stands for keyboard input: Scanner sc = new Scanner (System.in)

Read a string data into name through the scanner: String name = sc.next ()

Read an integer data into age through the scanner: Int age = sc.nextInt ()

Print message System.out.println ("name:" + name + ", age:" + age)

This is the end of the article on "how to receive and print keyboard input in big data's development". I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, please share it for more people to see.

Tags: Input information data keyboard scanner article development content name age more not bad practical representative character string integer integer article user Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Shulou Information MySQL OPPO Reno Shulou Technology