Home > Articles > Programming > Java

Introduction to Java Applications

  • Print
  • + Share This
This chapter introduces Java application programming, including examples of programs that display messages on the screen and a program that obtains two numbers from a user, calculates their sum and displays the result. You'll learn how to instruct the computer to perform arithmetic calculations and save their results for later use. The last example demonstrates how to make decisions.
This chapter is from the book
  • What's in a name?
  • That which we call a rose By any other name would smell as sweet.
  • William Shakespeare
  • When faced with a decision, I always ask, "What would be the most fun?"
  • Peggy Walker
  • The chief merit of language is clearness.
  • Galen
  • One person can make a difference and every person should try.
  • John F. Kennedy

2.1 Introduction

This chapter introduces Java application programming. We begin with examples of programs that display messages on the screen. We then present a program that obtains two numbers from a user, calculates their sum and displays the result. You'll learn how to instruct the computer to perform arithmetic calculations and save their results for later use. The last example demonstrates how to make decisions. The application compares numbers, then displays messages that show the comparison results.

This chapter uses tools from the JDK to compile and run programs. We've also posted Dive Into® videos at www.deitel.com/books/jhtp9/ to help you get started with the popular Eclipse and NetBeans integrated development environments.

  • + Share This
  • 🔖 Save To Your Account