Syndetics omslagsbild
Bild från Syndetics

Introduction to Java programming : comprehensive version / Y. Daniel Liang.

Av: Språk: Engelska Utgivningsuppgift: Upper Saddle River, NJ : Pearson Prentice Hall, 2007Utgåva: 6th edBeskrivning: 1301 s. illISBN:
  • 0132221586
Ämnen: DDK-klassifikation:
  • 005.13/3 22
Annan klassifikation:
  • Pubbz Java
Bestånd
Exemplartyp Aktuellt bibliotek Placering Hyllsignatur Status Förfallodatum Streckkod Exemplarreservationer
Bok Biblioteket HKR Biblioteket 005.13 Liang Tillgänglig 11156000158123
Antal reservationer: 0

Förbättrade beskrivningar från Syndetics:

Now integrating Java 5 throughout, this reference introduces Java programming fundamentals -- including problem-solving, object-oriented programming, GUI programming, data structures, networking, internationalization, advanced GUI programming, and Web programming.  Includes many new illustrations. Enhances examples throughout, using small, simple, and stimulating examples to demonstrate concepts and techniques.  Offers anearlier introduction to writing programs than the previous edition. Features a new chapter on recursion, expanding treatment from earlier editions.  A useful reference for anyone interested in learning more about programming.

Innehållsförteckning levererad av Syndetics

  • Part 1 Fundamentals of Programming (p. 1)
  • Chapter 1 Introduction to Computers, Programs, and Java (p. 3)
  • 1.1 Introduction (p. 4)
  • 1.2 What Is a Computer? (p. 4)
  • 1.3 Programs (p. 7)
  • 1.4 Operating Systems (p. 10)
  • 1.5 (Optional) Number Systems (p. 11)
  • 1.6 Java, the World Wide Web, and Beyond (p. 14)
  • 1.7 The Java Language Specification, API, JDK, and IDE (p. 16)
  • 1.8 A Simple Java Program (p. 17)
  • 1.9 Creating, Compiling, and Executing a Java Program (p. 18)
  • 1.10 Anatomy of a Java Program (p. 20)
  • 1.11 Displaying Text in a Message Dialog Box (p. 22)
  • Chapter 2 Primitive Data Types and Operations (p. 27)
  • 2.1 Introduction (p. 28)
  • 2.2 Writing Simple Programs (p. 28)
  • 2.3 Identifiers (p. 30)
  • 2.4 Variables (p. 31)
  • 2.5 Assignment Statements and Assignment Expressions (p. 32)
  • 2.6 Constants (p. 33)
  • 2.7 Numeric Data Types and Operations (p. 34)
  • 2.8 Numeric Type Conversions (p. 40)
  • 2.9 Character Data Type and Operations (p. 41)
  • 2.10 The String Type (p. 44)
  • 2.11 Getting Input from Input Dialogs (p. 45)
  • 2.12 Case Studies (p. 46)
  • 2.13 Getting Input from the Console (p. 52)
  • 2.14 Programming Style and Documentation (p. 55)
  • 2.15 Programming Errors (p. 57)
  • 2.16 Debugging (p. 58)
  • Chapter 3 Selection Statements (p. 67)
  • 3.1 Introduction (p. 68)
  • 3.2 Boolean Data Type and Operations (p. 68)
  • 3.3 If Statements (p. 73)
  • 3.4 Switch Statements (p. 81)
  • 3.5 Conditional Expressions (p. 83)
  • 3.6 Formatting Console Output and Strings (p. 84)
  • 3.7 Operator Precedence and Associativity (p. 86)
  • 3.8 Operand Evaluation Order (p. 87)
  • Chapter 4 Loops (p. 95)
  • 4.1 Introduction (p. 96)
  • 4.2 The while Loop (p. 96)
  • 4.3 The do-while Loop (p. 100)
  • 4.4 The for Loop (p. 102)
  • 4.5 Which Loop to Use? (p. 104)
  • 4.6 Nested Loops (p. 105)
  • 4.7 Minimizing Numerical Errors (p. 106)
  • 4.8 Case Studies (p. 108)
  • 4.9 Keywords break and continue (p. 113)
  • Chapter 5 Methods (p. 129)
  • 5.1 Introduction (p. 130)
  • 5.2 Creating a Method (p. 130)
  • 5.3 Calling a Method (p. 131)
  • 5.4 Void Method Example (p. 134)
  • 5.5 Passing Parameters by Values (p. 135)
  • 5.6 Overloading Methods (p. 137)
  • 5.7 Case Study: Computing Taxes with Methods (p. 139)
  • 5.8 The Scope of Variables (p. 141)
  • 5.9 The Math Class (p. 142)
  • 5.10 Case Study: Generating Random Characters (p. 145)
  • 5.11 Method Abstraction and Stepwise Refinement (p. 146)
  • 5.12 (Optional) Packages (p. 154)
  • Chapter 6 Arrays (p. 169)
  • 6.1 Introduction (p. 170)
  • 6.2 Array Basics (p. 170)
  • 6.3 Copying Arrays (p. 177)
  • 6.4 Passing Arrays to Methods (p. 179)
  • 6.5 Returning an Array from a Method (p. 181)
  • 6.6 (Optional) Variable-Length Argument Lists (p. 185)
  • 6.7 Searching Arrays (p. 186)
  • 6.8 Sorting Arrays (p. 188)
  • 6.9 The Arrays Class (p. 191)
  • 6.10 Two-Dimensional Arrays (p. 193)
  • 6.11 (Optional) Multidimensional Arrays (p. 199)
  • Part 2 Object-Oriented Programming (p. 211)
  • Chapter 7 Objects and Classes (p. 213)
  • 7.1 Introduction (p. 214)
  • 7.2 Defining Classes for Objects (p. 214)
  • 7.3 Constructors (p. 216)
  • 7.4 Accessing Objects via Reference Variables (p. 216)
  • 7.5 Using Classes from the Java Library (p. 222)
  • 7.6 Static Variables, Constants, and Methods (p. 224)
  • 7.7 Visibility Modifiers (p. 228)
  • 7.8 Data Field Encapsulation (p. 229)
  • 7.9 Immutable Objects and Classes (p. 232)
  • 7.10 Passing Objects to Methods (p. 233)
  • 7.11 The Scope of Variables (p. 235)
  • 7.12 The this Keyword (p. 236)
  • 7.13 Array of Objects (p. 237)
  • 7.14 Class Abstraction and Encapsulation (p. 239)
  • 7.15 Case Study: The Loan Class (p. 239)
  • 7.16 Case Study: The Course Class (p. 243)
  • 7.17 (Optional) Case Study: The StackOfIntegers Class (p. 245)
  • 7.18 (Optional GUI) Creating Windows (p. 247)
  • Chapter 8 Strings and Text I/O (p. 261)
  • 8.1 Introduction (p. 262)
  • 8.2 The String Class (p. 262)
  • 8.3 The Character Class (p. 270)
  • 8.4 The StringBuilder/StringBuffer Class (p. 273)
  • 8.5 Command-Line Arguments (p. 277)
  • 8.6 (Optional) Regular Expressions (p. 279)
  • 8.7 The File Class (p. 283)
  • 8.8 Text I/O (p. 286)
  • 8.9 (Optional GUI) Containers and Layout Managers (p. 290)
  • Chapter 9 Inheritance and Polymorphism (p. 301)
  • 9.1 Introduction (p. 302)
  • 9.2 Superclasses and Subclasses (p. 302)
  • 9.3 Using the super Keyword (p. 307)
  • 9.4 Overriding Methods (p. 309)
  • 9.5 Overriding vs. Overloading (p. 310)
  • 9.6 The Object Class and Its to String() Method (p. 310)
  • 9.7 Polymorphism, Dynamic Binding, and Generic Programming (p. 311)
  • 9.8 Casting Objects and the instanceof Operator (p. 313)
  • 9.9 The ArrayList Class (p. 315)
  • 9.10 A Custom Stack Class (p. 319)
  • 9.11 The protected Data and Methods (p. 320)
  • 9.12 The final Classes, Methods, and Variables (p. 321)
  • 9.13 (Optional) Methods in the Object Class (p. 322)
  • 9.14 (Optional) Hiding Data Fields and Static Methods (p. 325)
  • 9.15 (Optional) Initialization Blocks (p. 327)
  • 9.16 (Optional GUI) Inheriting GUI Components (p. 330)
  • Chapter 10 Abstract Classes and Interfaces (p. 341)
  • 10.1 Introduction (p. 342)
  • 10.2 Abstract Classes (p. 342)
  • 10.3 The Calendar and GregorianCalendar Classes (p. 346)
  • 10.4 Interfaces (p. 347)
  • 10.5 Processing Primitive Data Type Values as Objects (p. 356)
  • 10.6 Automatic Conversion Between Primitive Types and Wrapper Class Types (p. 362)
  • 10.7 (Optional GUI) Handling GUI Events (p. 363)
  • Chapter 11 Object-Oriented Design (p. 371)
  • 11.1 Introduction (p. 372)
  • 11.2 The Software Development Process (p. 372)
  • 11.3 Discovering Class Relationships (p. 373)
  • 11.4 Case Study: Object-Oriented Design (p. 377)
  • 11.5 Case Study: The Rational Class (p. 382)
  • 11.6 Class Design Guidelines (p. 387)
  • 11.7 (Optional) Modeling Dynamic Behavior Using Sequence Diagrams and Statecharts (p. 390)
  • 11.8 Framework-Based Programming Using Java API (p. 392)
  • Part 3 GUI Programming (p. 397)
  • Chapter 12 Getting Started with GUI Programming (p. 399)
  • 12.1 Introduction (p. 400)
  • 12.2 GUI Components (p. 400)
  • 12.3 The Java GUI API (p. 401)
  • 12.4 Frames (p. 403)
  • 12.5 Layout Managers (p. 406)
  • 12.6 The Color Class (p. 412)
  • 12.7 The Font Class (p. 413)
  • 12.8 Using Panels as Subcontainers (p. 413)
  • 12.9 Common Features of Swing GUI Components (p. 415)
  • 12.10 Image Icons (p. 418)
  • Chapter 13 Graphics (p. 425)
  • 13.1 Introduction (p. 426)
  • 13.2 Graphical Coordinate Systems (p. 426)
  • 13.3 The Graphics Class (p. 426)
  • 13.4 The paintComponent Method (p. 429)
  • 13.5 Drawing Graphics on Panels (p. 430)
  • 13.6 Drawing Strings, Lines, Rectangles, and Ovals (p. 431)
  • 13.7 Case Study: The FigurePanel Class (p. 432)
  • 13.8 Drawing Arcs (p. 436)
  • 13.9 The Polygon class and Drawing Polygons and Polylines (p. 438)
  • 13.10 Centering a Display Using the FontMetrics Class (p. 440)
  • 13.11 Case Study: The MessagePanel Class (p. 442)
  • 13.12 (Optional) Case Study: The StillClock Class (p. 447)
  • 13.13 (Optional) Displaying Images (p. 451)
  • 13.14 (Optional) Case Study: The ImageViewer Class (p. 452)
  • Chapter 14 Event-Driven Programming (p. 463)
  • 14.1 Introduction (p. 464)
  • 14.2 Event and Event Source (p. 465)
  • 14.3 Listeners, Registrations, and Handling Events (p. 465)
  • 14.4 Mouse Events (p. 477)
  • 14.5 Key Events (p. 479)
  • 14.6 (Optional) Animation Using the Timer Class (p. 482)
  • Chapter 15 Creating User Interfaces (p. 491)
  • 15.1 Introduction (p. 492)
  • 15.2 Buttons (p. 492)
  • 15.3 Check Boxes (p. 498)
  • 15.4 Radio Buttons (p. 501)
  • 15.5 Labels (p. 503)
  • 15.6 Text Fields (p. 504)
  • 15.7 Text Areas (p. 506)
  • 15.8 Combo Boxes (p. 509)
  • 15.9 Lists (p. 512)
  • 15.10 Scroll Bars (p. 515)
  • 15.11 Sliders (p. 518)
  • 15.12 Creating Multiple Windows (p. 521)
  • Chapter 16 Applets and Multimedia (p. 535)
  • 16.1 Introduction (p. 536)
  • 16.2 The Applet Class (p. 536)
  • 16.3 The JApplet Class (p. 538)
  • 16.4 The HTML File and the Tag (p. 539)
  • 16.5 Enabling Applets to Run as Applications (p. 544)
  • 16.6 Passing Strings to Applets (p. 546)
  • 16.7 (Optional) Case Study: TicTacToe (p. 550)
  • 16.8 (Optional) Case Study: Bouncing Ball (p. 554)
  • 16.9 (Optional) Locating Resource Using the URL Class (p. 557)
  • 16.10 (Optional) Playing Audio (p. 559)
  • 16.11 (Optional) Case Study: Multimedia Animations (p. 560)
  • 16.12 (Optional) Packaging and Deploying Java Projects (p. 562)
  • Part 4 Exception Handling, I/O, and Recursion (p. 575)
  • Chapter 17 Exceptions and Assertions (p. 577)
  • 17.1 Introduction (p. 578)
  • 17.2 Exception-Handling Overview (p. 578)
  • 17.3 Exceptions and Exception Types (p. 580)
  • 17.4 Understanding Exception Handling (p. 582)
  • 17.5 The finally Clause (p. 589)
  • 17.6 When to Use Exceptions (p. 590)
  • 17.7 Rethrowing Exceptions (p. 591)
  • 17.8 (Optional) Chained Exceptions (p. 591)
  • 17.9 (Optional) Creating Custom Exception Classes (p. 592)
  • 17.10 (Optional) Assertions (p. 593)
  • Chapter 18 Binary I/O (p. 605)
  • 18.1 Introduction (p. 606)
  • 18.2 How is I/O Handled in Java? (p. 606)
  • 18.3 Text I/O vs. Binary I/O (p. 606)
  • 18.4 Binary I/O Classes (p. 608)
  • 18.5 Case Study: Copying File (p. 615)
  • 18.6 Object I/O (p. 617)
  • 18.7 (Optional) Random Access Files (p. 621)
  • 18.8 (Optional) Case Study: Address Book (p. 623)
  • Chapter 19 Recursion (p. 635)
  • 19.1 Introduction (p. 636)
  • 19.2 Example: Factorials (p. 636)
  • 19.3 Example: Fibonacci Numbers (p. 638)
  • 19.4 Problem Solving Using Recursion (p. 640)
  • 19.5 Recursive Helper Methods (p. 641)
  • 19.6 Tower of Hanoi (p. 643)
  • 19.7 Fractals (p. 646)
  • 19.8 Recursion versus Iteration (p. 649)
  • Part 5 Data Structures (p. 657)
  • Chapter 20 Lists, Stacks, Queues, Trees, and Heaps (p. 659)
  • 20.1 Introduction (p. 660)
  • 20.2 Lists (p. 660)
  • 20.3 Stacks and Queues (p. 675)
  • 20.4 Binary Trees (p. 677)
  • 20.5 Heaps (p. 683)
  • 20.6 Priority Queues (p. 688)
  • Chapter 21 Generics (p. 693)
  • 21.1 Introduction (p. 694)
  • 21.2 Motivations (p. 694)
  • 21.3 Declaring Generic Classes and Interfaces (p. 695)
  • 21.4 Generic Methods (p. 698)
  • 21.5 Raw Type and Backward Compatibility (p. 699)
  • 21.6 Wildcards (p. 701)
  • 21.7 Important Facts (p. 703)
  • 21.8 Avoiding Unsafe Raw Types (p. 703)
  • 21.9 (Optional) Case Study: Generic Matrix Class (p. 705)
  • Chapter 22 Java Collections Framework (p. 713)
  • 22.1 Introduction (p. 714)
  • 22.2 The Collection Interface and the AbstractCollection Class (p. 715)
  • 22.3 Sets (p. 716)
  • 22.4 The Comparator Interface (p. 721)
  • 22.5 Lists (p. 723)
  • 22.6 Static Methods for Lists and Collections (p. 726)
  • 22.7 The Vector and Stack Classes (p. 729)
  • 22.8 Queues and Priority Queues (p. 731)
  • 22.9 (Optional) Maps (p. 733)
  • 22.10 Singleton and Unmodifiable Collections and Maps (p. 737)
  • Chapter 23 Algorithm Efficiency and Sorting (p. 745)
  • 23.1 Introduction (p. 746)
  • 23.2 Estimating Algorithm Efficiency (p. 746)
  • 23.3 Bubble Sort (p. 749)
  • 23.4 Merge Sort (p. 751)
  • 23.5 Quick Sort (p. 754)
  • 23.6 Heap Sort (p. 757)
  • 23.7 External Sort (p. 761)
  • Part 6 Concurrency, Networking, and Internationalization (p. 771)
  • Chapter 24 Multithreading (p. 773)
  • 24.1 Introduction (p. 774)
  • 24.2 Thread Concepts (p. 774)
  • 24.3 Creating Tasks and Threads (p. 774)
  • 24.4 The Thread Class (p. 777)
  • 24.5 Example: Flashing Text (p. 780)
  • 24.6 GUI Event Dispatcher Thread (p. 781)
  • 24.7 (Optional) Case Study: Clock with Audio (p. 782)
  • 24.8 Thread Pools (p. 785)
  • 24.9 Thread Synchronization (p. 787)
  • 24.10 (Optional) Synchronization Using Locks (p. 790)
  • 24.11 (Optional) Cooperation Among Threads (p. 792)
  • 24.12 (Optional) Case Study: Producer/Consumer (p. 797)
  • 24.13 (Optional) Blocking Queues (p. 799)
  • 24.14 (Optional) Semaphores (p. 801)
  • 24.15 Avoiding Deadlocks (p. 803)
  • 24.16 Thread States (p. 803)
  • 24.17 Synchronized Collections (p. 804)
  • 24.18 (Optional) JProgressBar (p. 805)
  • Chapter 25 Networking (p. 815)
  • 25.1 Introduction (p. 816)
  • 25.2 Client/Server Computing (p. 816)
  • 25.3 The InetAddress Class (p. 822)
  • 25.4 Serving Multiple Clients (p. 823)
  • 25.5 Applet Clients (p. 826)
  • 25.6 Sending and Receiving Objects (p. 829)
  • 25.7 Retrieving Files from Web Servers (p. 834)
  • 25.8 JEditorPane (p. 836)
  • 25.9 (Optional) Case Studies: Distributed TicTacToe Games (p. 838)
  • 25.10 (Optional) Datagram Socket (p. 850)
  • Chapter 26 Internationalization (p. 861)
  • 26.1 Introduction (p. 862)
  • 26.2 The Locale Class (p. 862)
  • 26.3 Displaying Date and Time (p. 864)
  • 26.4 Formatting Numbers (p. 875)
  • 26.5 (Optional) Resource Bundles (p. 881)
  • 26.6 (Optional) Character Encoding (p. 888)
  • Part 7 Advanced GUI Programming (p. 895)
  • Chapter 27 JavaBeans and Bean Events (p. 897)
  • 27.1 Introduction (p. 898)
  • 27.2 JavaBeans (p. 898)
  • 27.3 Bean Properties (p. 899)
  • 27.4 Java Event Model Review (p. 900)
  • 27.5 Creating Custom Source Components (p. 902)
  • 27.6 (Optional) Creating Custom Event Sets (p. 906)
  • Chapter 28 Containers, Layout Managers, and Borders (p. 917)
  • 28.1 Introduction (p. 918)
  • 28.2 Swing Container Structures (p. 918)
  • 28.3 Layout Managers (p. 920)
  • 28.4 Creating Custom Layout Managers (p. 938)
  • 28.5 JScrollPane (p. 943)
  • 28.6 JTabbedPane (p. 947)
  • 28.7 JSplitPane (p. 949)
  • 28.8 Swing Borders (p. 952)
  • 28.9 (Optional) Pluggable Look-and-Feel (p. 960)
  • Chapter 29 Menus, Toolbars, Dialogs, and Internal Frames (p. 967)
  • 29.1 Introduction (p. 968)
  • 29.2 Menus (p. 968)
  • 29.3 Popup Menus (p. 974)
  • 29.4 JToolBar (p. 976)
  • 29.5 Processing Actions Using the Action Interface (p. 978)
  • 29.6 JOptionPane Dialogs (p. 982)
  • 29.7 Creating Custom Dialogs (p. 989)
  • 29.8 JColorChooser (p. 992)
  • 29.9 JFileChooser (p. 994)
  • 29.10 (Optional) Creating Internal Frames (p. 999)
  • Chapter 30 MVC and Swing Models (p. 1007)
  • 30.1 Introduction (p. 1008)
  • 30.2 MVC (p. 1008)
  • 30.3 MVC Variations (p. 1014)
  • 30.4 Swing Model-View-Controller Architecture (p. 1015)
  • 30.5 JSpinner (p. 1016)
  • 30.6 Spinner Models and Editors (p. 1018)
  • 30.7 JList (p. 1024)
  • 30.8 List Models (p. 1029)
  • 30.9 List Cell Renderer (p. 1032)
  • 30.10 JComboBox (p. 1035)
  • Chapter 31 JTable and JTree (p. 1045)
  • 31.1 Introduction (p. 1046)
  • 31.2 JTable (p. 1046)
  • 31.3 Table Models and Table Column Models (p. 1051)
  • 31.4 Case Study: Modifying Rows and Columns (p. 1055)
  • 31.5 Table Renderers and Editors (p. 1060)
  • 31.6 Custom Table Renderers and Editors (p. 1062)
  • 31.7 Table Model Events (p. 1065)
  • 31.8 JTree (p. 1068)
  • 31.9 TreeModel and DefaultTreeModel (p. 1073)
  • 31.10 TreeNode, MutableTreeNode, and DefaultMutableTreeNode (p. 1074)
  • 31.11 TreePath and TreeSelectionModel (p. 1077)
  • 31.12 Case Study: Modifying Trees (p. 1080)
  • 31.13 Tree Node Rendering and Editing (p. 1084)
  • 31.14 Tree Events (p. 1085)
  • Part 8 Web Programming (p. 1091)
  • Chapter 32 Java Database Programming (p. 1093)
  • 32.1 Introduction (p. 1094)
  • 32.2 Relational Database Systems (p. 1094)
  • 32.3 SQL (p. 1098)
  • 32.4 JDBC (p. 1106)
  • 32.5 PreparedStatement (p. 1113)
  • 32.6 Retrieving Metadata (p. 1116)
  • Chapter 33 Advanced Java Database Programming (p. 1125)
  • 33.1 Introduction (p. 1126)
  • 33.2 A Universal SQL Client (p. 1126)
  • 33.3 Batch Processing (p. 1130)
  • 33.4 Scrollable and Updateable Result Set (p. 1135)
  • 33.5 RowSet, JdbcRowSet, and CachedRowSet (p. 1145)
  • 33.6 Storing and Retrieving Images in JDBC (p. 1150)
  • Chapter 34 Servlets (p. 1157)
  • 34.1 Introduction (p. 1158)
  • 34.2 HTML and Common Gateway Interface (p. 1158)
  • 34.3 Creating and Running Servlets (p. 1160)
  • 34.4 The Servlet API (p. 1164)
  • 34.5 Creating Servlets (p. 1168)
  • 34.6 HTML Forms (p. 1170)
  • 34.7 Database Programming in Servlets (p. 1176)
  • 34.8 Session Tracking (p. 1180)
  • 34.9 Sending Images from Servlets (p. 1195)
  • Chapter 35 JavaServer Pages (p. 1209)
  • 35.1 Introduction (p. 1210)
  • 35.2 A Simple JSP Page (p. 1210)
  • 35.3 How Is a JSP Page Processed? (p. 1211)
  • 35.4 JSP Scripting Constructs (p. 1211)
  • 35.5 Predefined Variables (p. 1213)
  • 35.6 JSP Directives (p. 1215)
  • 35.7 Using JavaBeans in JSP (p. 1219)
  • 35.8 Getting and Setting Properties (p. 1222)
  • 35.9 Associating Properties with Input Parameters (p. 1223)
  • 35.10 Forwarding Requests from JavaServer Pages (p. 1232)
  • 35.11 Case Study: Browsing Database Tables (p. 1232)
  • Chapter 36 Remote Method Invocations (p. 1243)
  • 36.1 Introduction (p. 1244)
  • 36.2 RMI Basics (p. 1244)
  • 36.3 Developing RMI Applications (p. 1246)
  • 36.4 RMI vs. Socket-Level Programming (p. 1252)
  • 36.5 Developing Three-Tier Applications Using RMI (p. 1253)
  • 36.6 RMI Callbacks (p. 1255)
  • Appendixes (p. 1269)
  • Appendix A Java Keywords (p. 1271)
  • Appendix B The ASCII Character Set (p. 1272)
  • Appendix C Operator Precedence Chart (p. 1274)
  • Appendix D Java Modifiers (p. 1276)
  • Appendix E Special Floating-Point Values (p. 1278)
  • Appendix F Bit Operations (p. 1279)
  • Index (p. 1281)