Introduction to Programming
Learn to program in Java with data structures, algorithms, and logic
Nick Samoylov
BIRMINGHAM - MUMBAI
Introduction to Programming
Copyright 2018 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Commissioning Editor: Aaron Lazar
Acquisition Editor: Denim Pinto
Content Development Editor: Nikhil Borkar
Technical Editor: Subhalaxmi Nadar
Copy Editor: Safis Editing
Project Coordinator: Ulhas Kambali
Proofreader: Safis Editing
Indexer: Aishwarya Gangawane
Graphics: Tania Dutta
Production Coordinator: Arvindkumar Gupta
First published: June 2018
Production reference: 1140618
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78883-912-9
www.packtpub.com
To my wife Luda, without whom I would not do anything useful to others and to my colleagues, especially Doug Galligan and Kaushlendra Singh, who taught me a lot.
Contributors
About the author
Nick Samoylov graduated from the Moscow Institute of Physics and Technology, has worked as a theoretical physicist, and learned to program a tool for testing his mathematical models. After the demise of the USSR, Nick created and successfully ran a software company, but was forced to close it following pressure from the government and criminal elements. In 1999, with his wife Luda and two daughters, he emigrated to the USA and has been living in Colorado ever since, working as a Java programmer. In his free time, Nick likes to write and hike in the Rocky Mountains.
Our CenturyLink "Photons" team, their friendship, technical advice, and support made this book possible. The team leader Kurt DeSchazer always seeks to improve and build something useful. Our managers Jim Gatley, Katie Feiman, Mike Gibson and architect Rich Cerami created a productive environment that benefited our customers and the company. My wife Luda helped me to make the text more readable and precise.
About the reviewers
Dr. Srinivas Padmanabhuni, the past president of ACM India, prior to cofounding Tarah Technologies, was Associate Vice President heading research at Infosys until October 2015. He has over 15 years' experience in IT and has given over 100 expert invited talks in the US, China, Australia, Canada, Singapore, UK, and India, including ivy league universities such as CMU, Purdue, and RUC.
Aristides Villarreal Bravo is a Java developer, a member of the NetBeans Dream Team, and a Java User Groups leader. He lives in Panama. He has organized and participated in various conferences and seminars related to Java, JavaEE, NetBeans, the NetBeans platform, free software, and mobile devices. He is the author of jmoordb and tutorials and blogs about Java, NetBeans, and web development.
Aristides has participated in several interviews on sites about topics such as NetBeans, NetBeans DZone, and JavaHispano. He is a developer of plugins for NetBeans.
My mother, father, and all my family and friends.
Packt is searching for authors like you
If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insights with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.
mapt.io
Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals
Improve your learning with Skill Plans built especially for you
Get a free eBook or video every month
Mapt is fully searchable
Copy and paste, print, and bookmark content
PacktPub.com
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com , you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.
Preface
The purpose of this book is to give the readers a solid understanding of Java fundamentals, leading them through a series of practical steps from the basics to real programming. The discussion and the examples aim to stimulate professional intuition, using well-proven programming principles and practices.
After finishing this book, you will be able to do the following:
- Install Java Virtual Machine and run it
- Install and configure your integrated development environment (editor)
- Write, compile, and execute Java programs and tests
- Understand and use Java language fundamentals
- Understand and apply object-oriented design principles
- Master the most frequently used Java constructs
Who this book is for
The targeted audience is those who would like to pursue a career in modern Java programming and the novice to intermediate Java programmer who would like to refresh their knowledge of the latest Java version.
What this book covers
, Java Virtual Machine (JVM) on Your Computer , introduces Java as a language and as a tool. It describes the motivation for Java creation, its history, its editions, architectural principles, and components. It also outlines the Java marketing position and the main areas of application. Then, a sequence of practical steps walk you through the process of Java machine installation and configuration on your computers and through its usage and main commands.
Next page