Proface
Chapter1IntroductiontoComputers,theInternetandtheWeb
1.1Introduction
1.2WhatIsaComputer?
1.3ComputerOrganization
1.4EvolutionofOperatingSystems
1.5Personal,DistributedandClient/ServerComputing
1.6MachineLanguages,AssemblyLanguagesandHigh--LevelLanguages
1.7HistoryofC++
1.8HistoryofJava
1.9JavaClassLibraries
1.10OtherHigh--LevelLangUages
1.11StructuredProgramming
1.12TheInternetandtheWorldWideWeb
1.13BasicsofaTypicalJavaEnvironment
1.14GeneralNotesaboutJavaandThisBook
1.15ThinkingAboutObjects:IntroductiontoObjectTechnologyandtheUnifiedModelingLanguage
1.16DiscoveringDesignPatterns:Introduction
1.17TouroftheBook
1.18(Optional)ATouroftheCaseStudyonObject--OrientedDesignwiththeUML
1.19(Optional)ATourofthe"DiscoveringDesignPattems"Sections
Summary
Terminology
Self-ReviewExercises
AnswerstoSeifReviewExercises
Exercises
Chapter2IntroductiontoJavaApplications
2.1Introduction
2.2AFirstPrograminJava:PrintingaLineofText
2.3ModifyingOurFirstJavaProgram
2.4DisplayingTextinaDialogBox
2.5AnotherJavaApplication:AddingIntegers
2.6MemoryConcepts
2.7Arithmetic
2.8DecisionMaking:EqualityandRelationalOperators
2.9(OptionalCaseStudy)ThinkingAboutObjects:ExaminingtheProblemStatement
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter3IntroductiontoJavaApplets
3.1Introduction
3.2SampleAppletsfromtheJava2SofwareDevelopmentKit
3.3ASimpleJavaApplet:DrawingaString
3.4TwoMoreSimpleApplets:DrawingStringsandLines
3.5AnotherJavaApplet:AddingFloating--PointNumbers
3.6ViewingAppletsinaWehBrowser
3.7JavaAppletInternetandWorldWideWebResources
3.8(OptionalCaseStudy)ThinkingAboutObjects:IdentifyingtheClassesinaProblemStatement
Summary
Terminology
Self-ReviewExercises
AnswerstoSelfReviewExercises
Exercises
Chapter4ControlStructures:Part1
4.1Introduction
4.2Algorithms
4.3Pseudocode
4.4ControlStructures
4.5TheifSelectionStructure
4.6Theif/elseSelectionStructure
4.7ThewhileRepetitionStructure
4.8FormulatingAlgorithms:CaseStudyl(CounterControlledRepetition)
4.9FormulatingAlgorithmswithTop--Down,StepwiseRefinement:CaseStudy2
(Sentinel--ControIledRepetition)
4.10FormulatingAlgorithmswithTop--Down,StepwiseRefinement:CaseStudy3
(NestedControlStructures)
4.11AssignmentOperators
4.12IncrementandDecrementOperators
4.13PrimitiveDataTypes
4.14(OptionalCaseStudy)ThinkingAboutObjects:IdentifyingClassAttributes
Summary
Terminology
SelfReviewExercises
AnswerstOSelfReviewExercises
Exercises
Chapter5ControlStructures:Part2
5.1Introduction
5.2EssentialsofCounter--ControlledRepetition
5.3TheforRepetitionStructure
5.4ExamplesUsingtheforStructure
5.5TheswitchMultiple--SelectionStructure
5.6ThedolwhileRepetitionStructure
5.7Statementsbreakandcontinue
5.8LabeledbreakandcontinueStatements
5.9LogicalOperators
5.10StructuredProgrammingSummary
5.11(OptionalCaseStudy)ThinkingMiutObjects:IdentapngObjects'StatesandAchvihes
Summary
Terminology
SeifReviewExercises
AnswerstoSelfReviewExercises
Exercises
Chapter6Methods
6.1Introduction
6.2ProgramModulesinJava
6.3MathClassMethods
6.4Methods
6.5MethodDefinitions
6.6ArgumentPromotion
6.7JavaAPIPackages
6.8Random--NumberGeneration
6.9Example:AGameofChance
6.10DurationofIdentifiers
6.11ScopeRules
6.12Recursion
6.13ExampleUsingRecursion:TheFibonacciSeries
6.14Recursionvs.Iteraion
6.15MethodOverloading
6.16MethodsofClassJApplet
6.17(OptionalCaseStudy)ThinkingAboutObjects:IdentifyingClassOperations
Summary
Terminology
SeifReviewExercises
AnswerstoSelfReviewExercises
Exercises
Chapter7Arrays
7.1Introduction
7.2Arrays
7.3DeclaringandAllocatingArrays
7.4ExamplesUsingArrays
7.5ReferencesandReferenceParameters
7.6PassingArraystoMethods
7.7SortingArrays
7.8SearchingArrays:LinearSearchandBinarySearch
7.9Multiple--SubscriptedArrays
7.10(OptionalCaseStudy)ThinkingAboutObjects:CollaborationAmongObjects
Summary
Terminology
SelfReviewExercises
AnswerstoSelfReviewExercises
Exercises
RecursionExercises
SpecialSection:BuildingYourOwnComputer
Chapter8Object--BasedProgramming
8.1Introduction
8.2ImplementingaTimeAbstractDataTypewithaClass
8.3ClassScope
8.4ControllingAccesstoMembers
8.5CreatingPackages
8.6InitializingClassObjects:Constructors
8.7UsingOverloadedConstructors
8.8UsingSetandGetMethods
8.9SoftwareReusability
8.10FinalInstanceVariables
8.11Composition:ObjectsasInstanceVariablesofOtherClasses
8.12PackageAccess
8.13UsingthethisReference
8.14Finalizers
8.15StaticClassMembers
8.16DataAbstractionandEncapsulation
8.17(OptionalCaseStudy)ThinkingAboutObjects:StartingtoProgramtheClassesfortheElevatorSimulation
Summary
Terminology
SelfReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
Chapter9Object--OrientedProgramming
9.1Introduction
9.2SuperclassesandSubclasses
9.3protectedMembers
9.4RelationshipbetweenSuperclassObjectsandSuhclassObjects
9.5ConstructorsandFinalizersinSubclasses
9.6ImplicitSubclass--Object--to--Superclass--ObjectConversion
9.7SoftwareEngineeringwithInheritance
9.8Compositionvs.Inheritance.
9.9CaseStudy:Point,Circle,Cylinder
9.10IntroductiontoPolymorphism
9.11TypeFieldsandswitchStatements
9.12DynamicMethodBinding
9.13finalMethodsandClasses
9.14AbstractSuperclassesandConcreteClasses
9.15PolymorphismExamples
9.16CaseStudy:APayrollSystemUsingPolymorphism
9.17NewClassesandDynamicBinding
9.18CaseStudy:InheritingInterfaceandImplementation
9.19CaseStudy:CreatingandUsingInterfaces
9.20InnerClassDefinitions
9.2lNotesonInnerClassDefinitions
9.22Type--WrapperClassesforPrimitiveTypes
9.23(OptionalCaseStudy)ThinkingAboutObjects:IncorporatingInheritanceinto
theElevatorSimulation
9.24(Optional)DiscoveringDesignPatterns:IntroducingCreational,StructuralandBehavioralDesignPattems
Summary
Terminology
Self-ReviewExercises
AnswerstoSelfReviewExercises
Exercises
Chapter10StringsandCharacters
10.1Introduction
10.2FundamentalsofCharactersandStrings
10.3StringConstructors
10.4StringMethodslength,charAtandgetChars
10.5ComparingStrings
10.6StringMethodhashCode
10.7LocatingCharactersandSubstringsinStrings
10.8ExtractingSubstringsfromStrings
10.9ConcatenatingStrings
10.10MiscellaneousStringMethods
10.11UsingStringMethodvalueOf
10.12StringMethodintem
10.l3StringBufferClass
10.l4StringBufferConstructors
10.15StringBufferMethodslength,capacity,setLengthandensureCapacity
10.16StringBufferMethodscharAt,setCharAt,getCharsandreverse
10.17StringBufferappendMethods
10.18StringBufferInsertionandDeletionMethods
10.19CharacterClassExamples
10.20ClassStringTokenizer
10.21CardShufflingandDealingSimulation
10.22(OptionalCaseStudy)ThinkingAboutObjects:EventHandling
Summary
Terminology
Self-ReviewExercises
AnswerstoSelf-ReviewExercises
Exercises
SpecialSection:AdvancedStringManipulationExercises
SpecialSection:ChallengingStringManipulationProjects
Chapter11GraphicsandJava2D
11.1Introduction
11.2GraphicsContextsandGraphicsObjects
11.3ColorControl
11.4FontControl
11.5DrawingLines,RectanglesandOvals
11.6DrawingArcs
11.7DrawingPolygonsandPolylines
11.8TheJava2DAPI
11.9Java2DShapes
11.l0(OptionalCaseStudy)ThinkingAboutObjects:DesigningInterfaceswiththeUML
Summary
Terminology
SelfReviewExercises
AnswerstoSelfReviewExercises
Exercises
Chapter12GraphicalUserInterfaceComponents:Part1
12.1Introduction
12.2SwingOverview
12.3JLanel
12.4Event--HandlingModel
12.5JTextFieldandJPasswordField
12.6JButton
12.7JCheckBoxandJRadioButton
12.8JComboBox
12.9JList
12.10Multiple--SelectionLists
12.11MouseEventHandling
12.12AdapterClasses
12.13KeyboardEventHandling
12.l4LayoutManagers
12.15Panels
12.l6(OptionalCaseStudy)ThinkingAboutObjects:UseCases
Summary
Terminology
SelfReviewExercises
AnswerstoSelfReviewExercises
Exercises
Chapter13GraphicalUserInterfaceComponents'Part2
13.1Introduction
13.2JTextArea
13.3CreatingaCustomizedSubclassofJPanel
13.4CreatingaSelfContainedSubclassofJPanel
13.5JSlider
13.6Windows
13.7DesigningProgramsthatExecuteasAppletsorApplications
13.8UsingMenuswithFrames
13.9UsingJPopupMenus
13.10PluggableLook--and--Feel
13.11UsingJDesktopPaneandJInternalFrame
13.12LayoutManagers
13.13BoxLayoutLayoutManager
13.14CardLayoutLayoutManager
13.15GridBagLayoutLayoutManager
13.16GridBagConstraintsConstantsRELATIVEandREMAINDER
13.17(OptionalCaseStudy)ThinkingAboutObjects:Model--View--Controller
13.18(Optional)DiscoveringDesignPatterns:DesignPatternsUsedinPackagesjava.awtandjavax.swing
Summmp
Terminology
SelfReviewExercises
AnswerstoSelfReviewExercises
Exercises
Chapter14ExceptionHandling
14.1Introduction
14.2WhenExceptionHandlingShouldBeUsed
14.3OtherError--HandlingTechniques
14.4BasicsofJavaExceptionHandling
14.5tryBlocks
14.6ThrowinganException
14.7CatchinganException
14.8Exception--HandlingExample:DividebyZero
14.9RethrowinganException
14.10throwsClause
14.11Constructors,FinalizersandExceptionHandling
14.12ExceptionsandInheritance
14.13finallyBlock
14.14UsingprintStackTraceandgetMessage
Summary
Terminology
SelfReviewExercises
AnswerstoSelfReviewExercises
Exercises
Chapter15Multithreading
15.1Introduction
15.2ClassThread:AnOverviewoftheThreadMethods
15.3ThreadStates:LifeCycleofaThread
15.4ThreadPrioritiesandThreadScheduling
15.5ThreadSynchronization
15.6Producer/ConsumerRelationshipwithoutThreadSynchronization
15.7ProducerlConsumerRelationshipwithThreadSynchronization
15.8Producer/ConsumerRelationship:TheCircularBuffer
15.9DaemonThreads
15.10RunnableInterface
15.11ThreadGroups
15.12(OptionalCaseStudy)ThinkingAboutObjects:Multithreading
15.13(Optional)DiscoveringDesignPatterns:ConcurrentDesignPatterns
Summary
Terminology
SelfReviewExercises
AnswerstoSeifReviewExercises
Exercises
Chapter16FilesandStreams
16.1Introduction
16.2DataHierarchy
16.3FilesandStreams
16.4CreatingaSequential--AccessFile
16.5ReadingDatafromaSequential--AccessFile
16.6UpdatingSequential--AccessFiles
16.7Random--AccessFiles
16.8CreatingaRandom--AccessFile
16.9WritingDataRandomlytoaRandom--AccessFile
16.10ReadingDataSequentiallyfromaRandom--AccessFile
16.11Example:ATransaction--ProcessingProgram
16.12ClassFile
Summary
Terminology
SelfReviewExercises
AnswerstoSeifReviewExercises
Exercises
Chapter17Networking
17.1Introduction
17.2ManipulatingURls
17.3ReadingaFileonaWebServer
17.4EstablishingaSimpleServerUsingStreamSockets
17.5EstablishingaSimpleClientUsingStreamSockets
17.6ClientlServerInteractionwithStreamSocketConnections
17.7ConnectionlessClient/ServerInteractionwithDatagrams
17.8Client/ServerTic--Tac--ToeUsingaMultithreadedServer
17.9SecurityandtheNetwork
17.10DeitelMessengerChatServerandClient
17.11(Optional)DiscoveringDesignPattems:DesignPattemsUsedinPackagesjava.ioandjava.net
Summary
Terminology
SelfReviewExercises
AnswerstoSelfReviewExercises
Exercises
Chapter18Multimedia:Images,Animation,AudioandVideo
18.1Introduction
18.2Loading,DisplayingandScalingImages
18.3AnimatingaSeriesofImages
18.4CustomizingLogoAnimatorviaAppletParameters
18.5ImageMaps
18.6LoadingandPlayingAudioClips
18.7InternetandWorldWideWebResources
Summary
Terminology
SelfReviewExercises
AnswerstoSelfReviewExercises
Exercises
SpecialSection:ChallengingMultimediaProjects
Chapter19DataStructures
19.1Introduction
19.2SelfReferentialClasses
19.3DynamicMemoryAllocation
19.4LinkedLists
19.5Stacks
19.6Queues
19.7Trees
Summary
Terminology
SelfReviewExercises
AnswerstoSeifReviewExercises
Exercises
SpecialSection:BuildingYourOwnCompiler
Chapter20JavaUtiIitiesPackageandBitManipulation
20.1Introduction
20.2VectorClassandEnumerationInterface
20.3StackClass
20.4DictionaryClass
20.5HashtableClass
20.6PropertiesClass
20.7RandomClass
20.8BitManipulationandtheBitwiseOperators
20.9BitSetClass
Summary
Terminology
SelfReviewExercises
AnswerstoSelfReviewExercises
Exercises
Chapter21Collections
21.1Introduction
21.2CollectionsOverview
21.3ClassArrays
21.4InterfaceCollectionandClassCollections
21.5Lists
21.6Algorithms
21.7Sets
21.8Maps
21.9SynchronizationWrappers
21.10UnmodifiableWrappers
21.11AbstractImplementations
21.12(Optional)DiscoveringDesignPatterns:DesignPattemsUsedinPackagejava.util
Summary
Terminology
SelfReviewExercises
AnswerstoSelfReviewExercises
Exercises
Chapter22JavaMediaFrameworkandJavaSound(onCD)
AJavaDemos
BJavaResources
COperatorPrecedenceChart
DASCIICharacterSet
ENumberSystems(onCD)
FCreatingHTMLDocumentationwithjavadoc(onCD)
GElevatorEventsandListenerInterfaces(onCD)
HElevatorModel(onCD)
IElevatorView(onCD)
JCareerOpportunities(onCD)
KUnicode@(onCD)
Bibliography
Index