DescriptionWhat is this book about?
The Java language has been growing from strength to strength since its inception in 1995. It has since proved to be both powerful and extraordinarily easy to learn and use. This is what makes it ideal for the beginner. With dramatic changes to the handling of files, and the introduction of native support for XML, Java has been updated to work faster and to be current with the incredible rise of XML as a medium for communicating data.
This edition of the Beginning Java books outlines everything the beginning programmer needs to know to program with the Java programming language and the 1.4 Java Developer Kit (JDK). With the release of JDK 1.4, programmers can look forward to the most stable edition yet, and even better performance than was available previously.
Over the course of the book, you will build an example application called Sketcher — a simple drawing tool — that teaches you how to build an interactive user interface with Java, how to save and open files, how to use color, and how to respond to user input.
What does this book cover?
- Teaches the Java language from scratch
- Object-oriented Programming in Java
- Handling errors and exceptions in applications
- Manipulating data and files
- Concurrent programming and threads
- A comprehensive introduction to Swing, the graphical user interface API for Java
- Printing in Java
- An introduction to XML
Who is this book for?
Ivor's inimitable style has proved to be a hit with nearly half a million people with its easy to learn approach and the many useful examples. Regularly voted the most popular Java programming book, this book teaches Java from scratch and assumes no previous knowledge. It is also suitable for those who have got some programming experience, especially C or C++, which will make learning easier.
Chapter 1: Introducing Java.
Chapter 2: Programs, Data, Variables and Calculation.
Chapter 3: Loops and Logic.
Chapter 4: Arrays and Strings.
Chapter 5: Defining Classes.
Chapter 6: Extending Classes and Inheritance.
Chapter 7: Exceptions.
Chapter 8: Understanding Streams.
Chapter 9: Accessing Files and Directories.
Chapter 10: Writing Files.
Chapter 11: Reading Files.
Chapter 12: Serializing Objects.
Chapter 13: Collection Classes.
Chapter 14: A Collection of Useful Classes.
Chapter 15: Threads.
Chapter 16: Creating Windows.
Chapter 17: Handling Events.
Chapter 18: Drawing in a Window.
Chapter 19: Extending the GUI.
Chapter 20: Filing and Printing Documents.
Chapter 21: Java and XML.
Chapter 22: Creating and Modifying XML Documents.
Appendix A: Keywords.
Appendix B: Computer Arithmetic.
|Code Replacement / Content Posting,The content for this title has been posted and may be accessed via:|
|4||Change in Text,|
Last paragraph: delete the line For more instructions on how to enroll, please see Appendix F at the back of this book.
|7||Change in the text ,|
Last paragraph, 2nd line: change runon to run on
|24||Change in the code,|
In the code private bool hatOn = false; should be private boolean hatOn = false;
|24||Change in text ,|
Third line in the second paragraph after the diagram whould read: The class has four instance variables, owner, type, size, and hatOn, and this last variable is always initialized as false.
|38||Error in Text,'... that is not integral'.|
'...that is not integer'.
|49||Variable names in shaded block of code,In the shaded block of code at the top of the page, each occurrence of the variable names apples , oranges and fruit should be replaced by numOranges , numApples and numFruit respectively.||1/22/05|
|2||49||Change in Code,|
The code has three variables declared at the beginning which should be:
|3||101||Mistake in diagram ,|
The second algorithm for the While loop has a mistake. The arrow below the Test condition box should be pointing down and not upwards.
|110||Change in code ,|
In the code there is an extra } bracket after System.out.println(i);
|116||White space ,|
Line 2 should read as assert false : daysInMonth has the value + daysInMonth; (there should be a white space after value ).
|125||Change in the diagram ,|
In the diagram the arrow should also poit to the newly created array.
|131||Extra } bracket ,|
In the code, remove the } bracket after: temperature [i][j] = (float)(45.0*Math.random() - 10.0); .
|4||135||Change in text ,|
The third last paragraph. It is \unnn and not \Unnn. Also, delete line The U can be upper or lower case and replace with The u can only be in lower case .
|136||Remove text ,|
Last paragraph: Remove the sentence However, if you try to compile a program containing this statement you will get an error.
|178||Change in heading ,|
Change the heading Running from a Method to Returning from a Method
|188||Wrong "," use ,|
In the second paragraph after the diagram the sentence should read: Now we have a Sphere object with a radius of 10.0 located at the coordinates (1.0, 1.0, 1.0).
|196||Change in code ,|
Add the following statement to the code for the