
Java Programming for Android Developers For Dummies
Description
Alles über E-Books | Antworten auf Fragen rund um E-Books, Kopierschutz und Dateiformate finden Sie in unserem Info- & Hilfebereich.
More details
Other editions
Additional editions

Person
Content
Introduction
Android is everywhere. In mid-2016, Android runs on 65 percent of all smartphones in the United States, on 75 percent of all smartphones in EU5 countries, and on 77 percent of all smartphones in China.1 In a study that spans the Americas, Europe, Asia, and the Middle East, GlobalWebIndex reports that "Android is the most favored OS when it comes to tablets, being used by almost a fifth of internet users and leading iPad by 5 points."2 More than 2.2 million apps are available for download at the Google Play store.3 And 9 million developers write code using Java, the language that powers Android devices.4
If you read this book in a public place (on a commuter train, at the beach, or on the dance floor at the Coyote Ugly saloon, for example), you can read proudly, with a chip on your shoulder and with your head held high. Android is hot stuff, and you're cool because you're reading about it.
How to Use This Book
You can attack this book in either of two ways: Go from cover to cover or poke around from one chapter to another. You can even do both (start at the beginning, and then jump to a section that particularly interests you). This book was designed so that the basic topics come first, and the more-involved topics follow them. But you may already be comfortable with some basics, or you may have specific goals that don't require you to know about certain topics.
In general, my advice is this:
- If you already know something, don't bother reading about it.
- If you're curious, don't be afraid to skip ahead. You can always sneak a peek at an earlier chapter, if you need to do so.
Conventions Used in This Book
Almost every technically themed book starts with a little typeface legend, and Java Programming for Android Developers For Dummies, 2nd Edition, is no exception. What follows is a brief explanation of the typefaces used in this book:
- New terms are set in italics.
- If you need to type something that's mixed in with the regular text, the characters you type appear in bold. For example: "Type MyNewProject in the text field."
- You also see this computerese font. I use computerese for Java code, filenames, onscreen messages, and other such things. Also, if something you need to type is really long, it appears in computerese font on its own line (or lines).
- You may need to change certain things when you type them on your own computer keyboard. For instance, I may ask you to type
public void Anynamewhich means that you type public void and then a name that you make up on your own. Words that you need to replace with your own words are set in italicized computerese.
What You Don't Have to Read
Pick the first chapter or section that has material you don't already know and start reading there. Of course, you may hate making decisions as much as I do. If so, here are some guidelines you can follow:
- If you already know what kind of an animal Java is and you don't care what happens behind the scenes when an Android app runs: Skip Chapter 1 and go straight to Chapter 2. Believe me - I won't mind.
- If you already know how to get an Android app running: Skip Part 1 and start with Part 2.
- If you have experience writing computer programs in languages other than C and C++: Start with Part 2. You'll probably find Part II to be easy reading. When you get to Part 3, it'll be time to dive in.
- If you have experience writing computer programs in C or C++: Skim Part II and start reading seriously in Part 3. (Java is a bit different from C++ in the way it handles classes and objects.)
- If you have experience writing Java programs: Come to my house and help me write Java Programming for Android Developers For Dummies, 3rd Edition.
If you want to skip the sidebars and the paragraphs with Technical Stuff icons, please do. In fact, if you want to skip anything at all, feel free.
Foolish Assumptions
In this book, I make a few assumptions about you, the reader. If one of these assumptions is incorrect, you're probably okay. If all these assumptions are incorrect . well, buy the book anyway.
- I assume that you have access to a computer. Access to an Android device is helpful but not absolutely necessary! All the software you need in order to test Android apps on a laptop or desktop computer is freely available. You simply download, install, and get going.
-
I assume that you can navigate your computer's common menus and dialog boxes. You don't have to be a Windows, Macintosh, or Linux power user, but you should be able to start a program, find a file, put a file into a certain directory - that sort of thing. Much of the time, when you follow the instructions in this book, you're typing code on the keyboard, not pointing and clicking the mouse.
On those occasions when you need to drag and drop, cut and paste, or plug and play, I guide you carefully through the steps. But your computer may be configured in any of several billion ways, and my instructions may not quite fit your special situation. When you reach one of these platform-specific tasks, try following the steps in this book. If the steps don't quite fit, consult a book with instructions tailored to your system. If you can't find such a book, send me an email. (My address appears later in the Introduction.)
- I assume that you can think logically. That's all there is to application development - thinking logically. If you can think logically, you've got it made. If you don't believe that you can think logically, read on. You may be pleasantly surprised.
-
I make very few assumptions about your computer programming experience (or your lack of such experience). In writing this book, I've tried to do the impossible: make the book interesting for experienced programmers yet accessible to people with little or no programming experience. This means that I don't assume any particular programming background on your part. If you've never created a loop or indexed an array, that's okay.
On the other hand, if you've done these things (maybe in Visual Basic, COBOL, or C++), you'll discover some interesting plot twists in Java. The creators of Java took the best ideas from object-oriented programming, streamlined them, reworked them, and reorganized them into a sleek, powerful way of thinking about problems. You'll find many new, thought-provoking features in Java. As you find out about these features, many of them will seem quite natural to you. One way or another, you'll feel good about using Java.
How This Book Is Organized
This book is divided into subsections, which are grouped into sections, which come together to make chapters, which are lumped, finally, into five parts (like one of those Russian matryoshka dolls). The parts of the book are described here.
Part 1: Getting Started with Java Programming for Android Developers
Part 1 covers all the nuts and bolts. It introduces you to the major ideas behind Java and Android software development and walks you through the installation of the necessary software products. You also run a few simple Java and Android programs.
The instructions in these chapters cover both Windows and Macintosh computers. They cover many computer configurations, including some not-so-new operating system versions, 32-bit systems and 64-bit systems, and situations in which you already have some form of Java on your computer. But installing software is always tricky, and you might have a few hurdles to overcome. If you do, check the end of this chapter for ways to reach me (the author) and get some quick advice. (Yes, I answer emails, tweets, Facebook posts, and notes sent by carrier pigeons.)
Part 2: Writing Your Own Java Programs
Chapters 4 through 8 cover Java's basic building blocks. These chapters describe the things you need to know so that you can get your computer humming along.
If you've written programs in Visual Basic, C++, or any other language, some of the material in Part 2 may be familiar to you. If so, you can skip sections or read this stuff quickly. But don't read too quickly. Java is a little different from some other programming languages, and Java's differences are worth noting.
Part 3: Working with the Big Picture: Object-Oriented Programming
Part 3 has some of my favorite chapters. This part covers the all-important topic of object-oriented programming. In these chapters, you find out how to map solutions to big problems. (Sure, the examples in these chapters aren't big, but the examples involve big ideas.) You discover, in bite-worthy increments, how to design classes, reuse existing classes, and construct objects.
Have you read any of those books that explain object-oriented programming in vague, general terms? I'm very proud to say that Java Programming for Android Developers For Dummies, 2nd Edition, isn't like that....
System requirements
File format: ePUB
Copy protection: Adobe-DRM (Digital Rights Management)
System requirements:
- Computer (Windows; MacOS X; Linux): Install the free reader Adobe Digital Editions prior to download (see eBook Help).
- Tablet/smartphone (Android; iOS): Install the free app Adobe Digital Editions or the app PocketBook before downloading (see eBook Help).
- E-reader: Bookeen, Kobo, Pocketbook, Sony, Tolino and many more (not Kindle).
The file format ePub works well for novels and non-fiction books – i.e., „flowing” text without complex layout. On an e-reader or smartphone, line and page breaks automatically adjust to fit the small displays.
This eBook uses Adobe-DRM, a „hard” copy protection. If the necessary requirements are not met, unfortunately you will not be able to open the eBook. You will therefore need to prepare your reading hardware before downloading.
Please note: We strongly recommend that you authorise using your personal Adobe ID after installation of any reading software.
For more information, see our ebook Help page.