Java Programming: From the Beginning
Suitable for the classroom or for self-study,Java Programming from  the Beginningputs basic Java development and object-oriented design into  the hands of any computer-literate reader. Assuming no knowledge of  computers--except, of course, an aptitude for programming and a willingness to  learn--this textbook is one of the more accessible and well-presented  introductions to Java available today.The author is an experienced college teacher, and the book's effective  presentation style is arguably its major strength. Early chapters rely on simple  mathematical examples (such as converting temperatures from Fahrenheit to  Celsius, or averaging grades). Other examples look at parsing social security  numbers or storing entries from a telephone book.Java Programmingdoes a  good job of presenting the basics of object-oriented design in terms of both  designing custom classes and taking advantage of existing Java classes, such asString,StringBuffer, andVectorobjects. Of course, along  the way, the basics of Java syntax are covered, including many of its keywords,  operators, and data types.Although it's suitable for a college classroom, this textbook is never academic  or dull. The colloquial and friendly writing style presents the essentials of  Java without ever getting bogged down in theory. Besides command-line programs,  you'll learn also how to do basic graphics in Java, and even play simple games  (like blackjack). The custom classes that are presented in this book make it  simpler to work with Java, even for beginners. Every chapter provides extensive  review summaries of the important points that are demonstrated in each section,  as well as a handful of exercises that'll let you try out material on your  own.Now that Java is used routinely as a first programming language in many  colleges,Java Programming from the Beginningfills a useful niche. It's  also an excellent home-study choice for the reader who appreciates a patient and  thorough teaching style.--Richard DraganTopics covered:Basics of computer hardware and softwareGraphical user interfaces vs. text-based interfacesGeneral introduction  to programming languagesBasic Java language features and syntaxCalculationsConstantsMethodsConsole I/OComputing  averagesSyntax errors and debuggingIntroduction to object-oriented  design: classes, objects, and instance methodsWorking with the JavaStringandStringBufferclassesBasic control structuresComparisonRelational and equality operatorsOperator precedenceLoops and counting variablesDecoding social security numbersUsing  Java arrays and theVectorclassUsing arrays for a databaseArrays of objectsSample case study for a telephone directoryDrawing basic shapes, colors, and textA message window exampleClass variables and methodsPassing arguments to methodsHelper methodsPrinciples for designing methods in JavaException-handling basicsTheswitchstatementUsing the Java  primitive typesWriting custom classesThethiskeywordConstructorsCode reuseSample code for blackjackInheritance  and subclassesPolymorphismAbstract classesThefinalclassesIntroduction to the Abstract Windowing Toolkit (AWT)Frames and  event handlersLayout managersData structures, sorting, and searchingUsing sets (and bit sets)File I/O in Java (opening, reading, and  writing files)Installing the Sun JDKCustom classes for simplified  introductory Java programming