Java For Dummies

Java For Dummies

Language: English

Pages: 432

ISBN: 1118407806

Format: PDF / Kindle (mobi) / ePub


The top-selling beginning Java book is now fully updated!

As an unstoppably platform-independent, object-oriented programming language, Java is used for developing web and mobile applications. In this up-to-date bestselling book, veteran author Barry Burd shows you how to create basic Java objects and clearly explains when you should simply reuse existing code.

  • Explores how the new version of Java offers more robust functionality and new features such as closures to keep Java competitive with more syntax-friendly languages like Python and Ruby
  • Covers object-oriented programming basics with Java, code reuse, the essentials of creating a Java program using the new JDK 7, creating basic Java objects, and new Eclipse features
  • Features a companion website that offers all code from the book and bonus chapters

Java For Dummies, 6th Edition gets you started with creating Java applications quickly and easily.

Core Java, Volume 1: Fundamentals (9th Edition)

Java Software Solutions: Foundations of Program Design (8th Edition)

Core Java, Volume 2: Advanced Features (9th Edition)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

building, imagine that you have already written a computer program to keep track of the building instructions for houses in a new development. Then, the big boss decides on a modified plan — a plan in which half the houses have three bedrooms, and the other half have four. If you use the old FORTRAN/C style of computer programming, your instructions look like this: Dig a ditch for the basement. Lay concrete around the sides of the ditch. Put two-by-fours along the sides for the basement’s

blueprint.) Your builder colleagues are amazed with your sense of logic and organiza-tion, but they have concerns. They pose a question. “You called one of the blueprints the ‘three-bedroom house’ blueprint. How can you do this if it’s a blueprint for a second floor and not for a whole house?” You smile knowingly and answer, “The three-bedroom house blueprint can say, ‘For info about the lower floors, see the original house blueprint.’ That way, the three-bedroom house blueprint describes a

the Big Picture: Object-Oriented Programming ....................................143 Chapter 7: Thinking in Terms of Classes and Objects . . . . . . . . . . . .145 Defining a Class (What It Means to Be an Account) ................................145 Declaring variables and creating objects ........................................148 Initializing a variable ..........................................................................150 Using variables

letters with one another is also okay. What’s strange is that when you compare an uppercase letter with a lowercase letter, the uppercase letter is always smaller. So, even though ‘Z’ < ‘A’ is false, ‘Z’ < ‘a’ is true. Under the hood, the letters A through Z are stored with numeric codes 65 through 90. The letters a through z are stored with codes 97 through 122. That’s why each uppercase letter is smaller than each lowercase letter. Be careful when you compare two numbers for equality (with

out.print(“ plus $”); out.print(myAccount.getInterest(5.00)); out.println(“ interest “); yourAccount.display(); double yourInterestRate = 7.00; out.print(“ plus $”); double yourInterestAmount = yourAccount.getInterest(yourInterestRate); out.print(yourInterestAmount); out.println(“ interest “); } } The output of the code in Listings 7-5 and 7-6 is shown in Figure 7-5. In Listing 7-5, the Account class has a getInterest method. This getInterest method is called twice from the main

Download sample

Download