Apress

Java 7 for Absolute Beginners

By Jay Bryant

Java 7 for Absolute Beginners Cover Image

Java 7 Programming for Absolute Beginners introduces the new core, open-source Java Development Kit. Its focus is on practical knowledge and completeness—it provides all the bits and pieces an utter novice needs to get started programming in Java.

Full Description

  • ISBN13: 978-1-4302-3686-3
  • 320 Pages
  • User Level: Beginner
  • Publication Date: January 10, 2012
  • Available eBook Formats: EPUB, MOBI, PDF
  • Print Book Price: $39.99
  • eBook Price: $27.99
Buy eBook Buy Print Book Add to Wishlist

Related Titles

Full Description

Java 7 Programming for Absolute Beginners introduces the new core, open source Java Development Kit. Its focus is on practical knowledge and its completeness—it provides all the bits and pieces an utter novice needs to get started programming in Java.  

It seems as if everyone is writing applications or apps these days for Android, BlackBerry, and the enterprise—it's where the money's at. But, how do they do it? Well, it's best to start by learning Java, one of the most popular programming languages around these days, still. Yes, that's right. 

This book:

  • Teaches Java development in language anyone can understand, giving you the best possible start
  • Provides simple, step-by-step examples that make learning easy, allowing you to pick up the concepts without fuss
  • Offers clear code descriptions and layout so that you can get your code running as soon as possible

What you’ll learn

  • How a computer processes programs
  • Write a program in Java
  • Debug a program
  • Choose and manipulate the data structures that best match your purpose
  • Create a user interface in Java
  • How to do animation in a Java program
  • Advanced topics such as thread management and recursion that any programmer will soon need

Who this book is for

Everyone! This book is for anyone who wants to learn to develop applications or apps for the enterprise or mobile using Android or BlackBerry and much more. No previous programming experience is necessary.

Table of Contents

Table of Contents

  1. Writing Your First Java Program
  2. Java Syntax
  3. Data types
  4. Operators
  5. Branching and Looping
  6. Object-Oriented Programming
  7. Writing a UI 
  8. Writing and Reading Files
  9. Writing and Reading XML
  10. Animation
  11. Debugging
  12. Video Games
  13. Garbage Collection
  14. Recursion
  15. Generics and Regular Expressions
Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.

Errata

If you think that you've found an error in this book, please let us know about it. You will find any confirmed erratum below, so you can check if your concern has already been addressed.

* Required Fields

On page 11:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 at com.bryantcs.examples.hello.Hello.main(Hello.java:17)

On page 16-17:

Your epub doc doesn't match the mobi doc. The mobi file has errors. I hope this isn't the a sign of the rest of the book.

Listing 2-2: for loop missing characters:

    for (int i = 0; i       result += ints[i];     }     end = System.nanoTime();

Jay Bryant. Java 7 for Absolute Beginners (Kindle Locations 577-578).


Listing 2-3: Both for and if statements wrong:

    for (int i = 0; i       sb.append(values[i]);       if (i         sb.append(", ");

Jay Bryant. Java 7 for Absolute Beginners (Kindle Locations 599-600).

On page 63:

This following example is incorrect. The authors statement at the end is wrong. The values returned are false and true, not true and false.

Listing 4-15. Equality operator examples
int a = 0;
int b = 1;
String s = "s";
String sToo = "s";
System.out.println(a == b);
System.out.println(s == sToo);

That bit of code prints “true” for a == b and “false” for s == sToo.

On page 65:

In the Logical OR Operator (||) paragraph the first sentence says "The logical AND operator (||)"
It should say "The logical OR operator (||)"

On page 86:

I've got this message bellow when I try to run the Vehicle class. I'm not sure if it's an error or just because i'm using a Mac....

run:
Exception in thread "main" java.lang.NoSuchMethodError: main
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)