Java in easy steps, 7th edition
eBook - ePub

Java in easy steps, 7th edition

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Java in easy steps, 7th edition

About this book

Java in easy steps, 7th edition instructs you how to easily create your own Java programs. The book contains separate chapters on the major features of the Java language. Complete example programs with colourized code illustrate each important aspect of Java programming – all in easy steps.

This book assumes no previous knowledge of any programming language so it's ideal for the newcomer to computer programming. Each chapter builds your knowledge of Java. By the end of this book you will have gained a sound understanding of the Java language and be able to write your own Java programs and compile them into executable files that can be run on any Java-enabled device.

This 7th edition of Java in easy steps covers the many exciting features of Java, including:

  • How to quickly run statements in the interactive shell named jshell - similar to the Python interpreter:
  • How to make programs with the javac compiler and execute them with the java runtime.
  • How to produce interactive Windows apps that can be easily distributed as jar program bundles.
  • How to create mobile device apps using Java functionality within the Android operating system.

Table of Contents

  • Getting started
  • Performing operations
  • Making statements
  • Directing values
  • Manipulating data
  • Creating classes
  • Importing functions
  • Building interfaces
  • Recognizing events
  • Deploying programs

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Java in easy steps, 7th edition by Mike McGrath in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in Java. We have over one million books available in our catalogue for you to explore.
1
Getting started
Welcome to the exciting world of Java programming. This chapter shows how to create and execute simple Java programs, and demonstrates how to store data within programs.
Introduction
Installing the JDK
Writing a first Java program
Compiling & running programs
Creating a variable
Recognizing data types
Creating constants
Adding comments
Troubleshooting problems
Summary
Introduction
The Java™ programming language was first developed in 1990 by an engineer at Sun Microsystems named James Gosling. He was unhappy using the C++ programming language so he created a new language that he named “Oak”, after the oak tree that he could see from his office window.
image
This is “Duke” – the friendly mascot of the Java programming language.
As the popularity of the World Wide Web grew, Sun recognized that Gosling’s language could be developed for the internet. Consequently, Sun renamed the language “Java” (simply because that name sounded cool) and made it freely available in 1995. Developers around the world quickly adopted this exciting new language and, because of its modular design, were able to create new features that could be added to the core language. The most endearing additional features were retained in subsequent releases of Java as it developed into the comprehensive version of today.
The essence of Java is a library of files called “classes”, which each contain small pieces of ready-made proven code. Any of these classes can be incorporated into a new program, like bricks in a wall, so that only a relatively small amount of new code ever needs to be written to complete the program. This saves the programmer a vast amount of time, and largely explains the huge popularity of Java programming. Additionally, this modular arrangement makes it easier to identify any errors than in a single large program.
Java technology is both a programming language and a platform. In Java programming, the source code is first written as human-readable plain text files ending with the .java extension. These are compiled into machine-readable .class files by the javac compiler. The ja...

Table of contents

  1. Cover
  2. Title
  3. Copyright
  4. Contents
  5. Preface
  6. 1 Getting started
  7. 2 Performing operations
  8. 3 Making statements
  9. 4 Directing values
  10. 5 Manipulating data
  11. 6 Creating classes
  12. 7 Importing functions
  13. 8 Building interfaces
  14. 9 Recognizing events
  15. 10 Deploying programs
  16. Back Cover