In this video, Doug Winnie shows how to capture input from the user to create an interactive Java program. Through using features of the Java language, including them using import statements, users can enter text into the console and have it saved as variables in the program.
- [Instructor] So far, all of our programs…haven't had any interaction with the user.…We've coded the Java and built and ran the program.…Programs need to have ways to interact with the user.…And that happens in multiple ways.…Using the keyboard, mouse, and even with your voice or body.…The simplest is to interact with the keyboard.…For our console application, we can do that…by allowing the user to enter text into the console.…Java applications have many ways to capture input,…and they vary between frameworks.…So we'll use a simple example here for our program.…
Before we start adding in some code,…let's look at what we start with.…This is essentially an empty project.…But there is one line at the top…on line three, import statement.…When we work with Java, there are parts…of the Java language, or development kit,…that are included with our project automatically.…Everything we've been using so far…has been part of the basic Java system.…But when you work with something…outside of the core language,…you need to explicitly add it to your project.…
- The history of Java
- Setting up your development environment
- Working with values and variables
- Using methods and functions
- Capturing user input
- Creating conditional tests
- Using loops
- Creating and changing arrays
- Object-oriented programming in Java
- Defining permissions
- Extending classes
Skill Level Beginner
Computer Science Principles: The Internetwith Doug Winnie59m 30s Beginner
Java Essential Training for Studentswith Peggy Fisher3h 6m Intermediate
1. Intro to Java
2. Define Actions Using Code
3. Repeat Actions and Test for Conditions
4. Object-Oriented Programming Basics
Next steps1m 44s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.