错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Making Your Application Interactive

  • Iuliana Cosmina

摘要

So far in the book, input data for our Java programs was provided via arrays or variables that were initialized inside the code or via program arguments. In real life, however, most applications require interaction with the user. The user can be provided access by entering a username and a password, and the user is sometimes required to type in details to confirm their identity or to instruct the application what to do. Java supports multiple methods for user input to be read. In this chapter, we will be covering a few ways to build interactive Java applications that take their input either from the console, either from Java built interfaces, and from either desktop or web.