From the course: Java 8+ Essential Training: Syntax and Structure

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Challenge: A simple calculator

Challenge: A simple calculator - Java Tutorial

From the course: Java 8+ Essential Training: Syntax and Structure

Start my 1-month free trial

Challenge: A simple calculator

- [Instructor] If you'd like to test your knowledge of Java so far, try creating this application. Don't open the project that's associated with this video. Instead, create a brand new project from scratch and add all of the code you need for this functionality. When I run the application, I'm prompted for a numeric value. I'll type a numeric value in and press enter or return, then I'm prompted for a second numeric value and I will type a value in and press enter or return again, and the two values are added together. To accept input, you'll need to use the scanner class with its next line method. You'll need to accept two values and save them as string variables, then you'll need to add the two values together and display the result. After you've finished your version of the application, watch the next video for my solution to this challenge.

Contents