Details

Beginning Java Programming


Beginning Java Programming

The Object-Oriented Approach
1. Aufl.

von: Bart Baesens, Aimee Backiel, Seppe vanden Broucke

30,99 €

Verlag: Wiley
Format: EPUB
Veröffentl.: 17.02.2015
ISBN/EAN: 9781118739358
Sprache: englisch
Anzahl Seiten: 672

DRM-geschütztes eBook, Sie benötigen z.B. Adobe Digital Editions und eine Adobe ID zum Lesen.

Beschreibungen

<b>A comprehensive Java guide, with samples, exercises, case studies, and step-by-step instruction</b> <p><i>Beginning Java Programming: The Object Oriented Approach</i> is a straightforward resource for getting started with one of the world's most enduringly popular programming languages. Based on classes taught by the authors, the book starts with the basics and gradually builds into more advanced concepts. The approach utilizes an integrated development environment that allows readers to immediately apply what they learn, and includes step-by-step instruction with plenty of sample programs. Each chapter contains exercises based on real-world business and educational scenarios, and the final chapter uses case studies to combine several concepts and put readers' new skills to the test.</p> <p><i>Beginning Java Programming: The Object Oriented Approach</i> provides both the information and the tools beginners need to develop Java skills, from the general concepts of object-oriented programming. Learn to:</p> <ul> <li>Understand the Java language and object-oriented concept implementation</li> <li>Use Java to access and manipulate external data</li> <li>Make applications accessible to users with GUIs</li> <li>Streamline workflow with object-oriented patterns</li> </ul> <p>The book is geared for those who want to use Java in an applied environment while learning at the same time. Useful as either a course text or a stand-alone self-study program, <i>Beginning Java Programming</i> is a thorough, comprehensive guide.</p>
<p>Introduction xxii</p> <p><b>Chapter 1: A General Introduction To Programming 1</b></p> <p>The Programming Process 2</p> <p>Object-Oriented Programming: A Sneak Preview 5</p> <p>Programming Errors 6</p> <p>Syntax/Compilation Errors 6</p> <p>Runtime Errors 6</p> <p>Logic/Semantic Errors 7</p> <p>Principles of Software Testing 7</p> <p>Software Maintenance 8</p> <p>Adaptive Maintenance 8</p> <p>Perfective Maintenance 8</p> <p>Corrective Maintenance 8</p> <p>Preventive Maintenance 9</p> <p>Principles of Structured Programming 9</p> <p><b>Chapter 2: Getting To Know Java 11</b></p> <p>A Short Java History 12</p> <p>Features of Java 13</p> <p>Looking Under the Hood 13</p> <p>Bytecode 14</p> <p>Java Runtime Environment (JRE) 15</p> <p>Java Application Programming Interface (API) 16</p> <p>Class Loader 17</p> <p>Bytecode Verifier 18</p> <p>Java Virtual Machine (JVM) 18</p> <p>Java Platforms 19</p> <p>Java Applications 19</p> <p>Standalone Applications 19</p> <p>Java Applets 20</p> <p>Java Servlets 20</p> <p>Java Beans 21</p> <p>Java Language Structure 21</p> <p>Classes 22</p> <p>Identifiers 22</p> <p>Java Keywords 22</p> <p>Variables 23</p> <p>Methods 23</p> <p>Comments 24</p> <p>Naming Conventions 26</p> <p>Java Data Types 27</p> <p>Primitive Data Types 27</p> <p>Literals 28</p> <p>Operators 29</p> <p>Arithmetic Operators 29</p> <p>Assignment Operators 30</p> <p>Bitwise Operators 31</p> <p>Logical Operators 32</p> <p>Relational Operators 34</p> <p>Arrays 34</p> <p>Type Casting 37</p> <p>Summary 40</p> <p><b>Chapter 3: Setting Up Your Development Environment 41</b></p> <p>Integrated Development Environments 42</p> <p>Coding in Text Editors 42</p> <p>Choosing an IDE 46</p> <p>Eclipse 47</p> <p>NetBeans 47</p> <p>IntelliJ IDEA 47</p> <p>Continuing with One IDE 47</p> <p>Installing Eclipse on Your Computer 48</p> <p>Downloading and Installing Eclipse 48</p> <p>Using Eclipse 50</p> <p><b>Chapter 4: Moving Toward Object‐Oriented Programming 61</b></p> <p>Basic Concepts of Object‐Oriented Programming 62</p> <p>Classes and Objects in Java 63</p> <p>Defining Classes in Java 63</p> <p>Creating Objects 71</p> <p>Storing Data: Variables 76</p> <p>Instance Variables 76</p> <p>Class Variables 80</p> <p>Final Variables 82</p> <p>Variable Scope 87</p> <p>Defining Behavior: Methods 91</p> <p>Instance Methods 91</p> <p>Class Methods 94</p> <p>Constructors 95</p> <p>The Main Method 100</p> <p>Method Argument Passing 109</p> <p>Java SE Built‐in Classes 115</p> <p>Classes in the java.lang Package 115</p> <p>Classes in the java.io and java.nio Packages 117</p> <p>Classes in the java.math Package 118</p> <p>Classes in the java.net, java.rmi, javax.rmi, and org.omg.CORBA Packages 118</p> <p>Classes in the java.awt and javax.swing Packages 118</p> <p>Classes in the java.util Package 118</p> <p>Collections 119</p> <p>Other Utility Classes 126</p> <p>Other Classes and Custom Libraries 127</p> <p><b>Chapter 5: Controlling the Flow of Your Program 129</b></p> <p>Comparisons Using Operators and Methods 130</p> <p>Comparing Primitive Data Types with Comparison Operators 130</p> <p>Comparing Composite Data Types with Comparison Methods 132</p> <p>Understanding Language Control 135</p> <p>Creating if-then Statements 135</p> <p>Nesting if-then Statements 137</p> <p>Creating for Loops 138</p> <p>What is an Enhanced for Loop? 143</p> <p>Nesting for Loops 146</p> <p>Creating while Loops 148</p> <p>What is a do while Loop? 152</p> <p>Comparing for and while Loops 156</p> <p>Creating Switches 156</p> <p>Comparing Switches and if-then Statements 161</p> <p>Reviewing Keywords for Control 162</p> <p>Controlling with the return Keyword 162</p> <p>Controlling with the break Keyword 163</p> <p>Controlling with the continue Keyword 164</p> <p>Specifying a Label for break or continue Control 164</p> <p>Reviewing Control Structures 168</p> <p><b>Chapter 6: Handling Exceptions and Debugging 171</b></p> <p>Recognizing Error Types 172</p> <p>Identifying Syntax Errors 172</p> <p>Identifying Runtime Errors 175</p> <p>Identifying Logical Errors 176</p> <p>Exceptions 180</p> <p>Common Exceptions 181</p> <p>Catching Exceptions 187</p> <p>Debugging Your Applications 195</p> <p>Using a Debugger Tool 195</p> <p>Using a Logging API 200</p> <p>Testing Your Applications 210</p> <p>Summary 219</p> <p><b>Chapter 7: Delving Further Into Object‐Oriented Concepts 221</b></p> <p>Annotations 222</p> <p>Overloading Methods 222</p> <p>The this KeyWord 224</p> <p>Information Hiding 229</p> <p>Access Modifiers 230</p> <p>Getters 231</p> <p>Setters 232</p> <p>Class Inheritance 240</p> <p>The Keyword super 241</p> <p>Method Overriding 243</p> <p>Polymorphism 243</p> <p>Static Binding 244</p> <p>Dynamic Binding 244</p> <p>The Superclass Object 245</p> <p>Abstract Classes and Methods 246</p> <p>Packages 251</p> <p>Interfaces 252</p> <p>Garbage Collection 259</p> <p><b>Chapter 8: Handling Input and Output 261</b></p> <p>General Input and Output 262</p> <p>Input and Output in Java 266</p> <p>Streams 268</p> <p>Byte Streams 269</p> <p>Character Streams 275</p> <p>Buffered Streams 276</p> <p>Data and Object Streams 278</p> <p>Other Streams 281</p> <p>Scanners 281</p> <p>Input and Output from the Command-Line 283</p> <p>Input and Output from Files 290</p> <p>Java NIO2 File Input and Output 291</p> <p>The Path Interface 291</p> <p>The Files Class 293</p> <p>Checking Existence 293</p> <p>Legacy File Input and Output 304</p> <p>A Word on FileUtils 305</p> <p>Conclusion 305</p> <p><b>Chapter 9: Working With Databases in Java 307</b></p> <p>Covering the Basics of Relational Databases 308</p> <p>Accessing Relational Databases from Java 315</p> <p>Java Database Connectivity (JDBC) 315</p> <p>SQLJ 321</p> <p>Ensuring Object Persistence 324</p> <p>Hibernate 325</p> <p>Object-Oriented Database Access from Java 341</p> <p>Comparing Java Database Access Technologies 343</p> <p>What’s Ahead 344</p> <p><b>Chapter 10: Accessing Web Sources 347</b></p> <p>A Brief Introduction to Networking 348</p> <p>Web Services 360</p> <p>RPC and RMI 360</p> <p>SOAP 364</p> <p>REST 366</p> <p>Accessing Web Services and Sources with Java 368</p> <p>Accessing SOAP Services 368</p> <p>Installing JAX‐WS 368</p> <p>Accessing SOAP Services with JAX‐WS Without WSDL 369</p> <p>Accessing SOAP Services with JAX‐WS with WSDL 395</p> <p>Accessing REST Services 406</p> <p>Accessing REST Services Without Authentication 408</p> <p>Accessing REST Services with Authentication 421</p> <p>Screen Scraping 449</p> <p>Screen Scraping Without Cookies 451</p> <p>Screen Scraping with Cookies 453</p> <p>Creating Your Own Web Services with Java 457</p> <p>Setting Up an HTTP Server 457</p> <p>Providing REST Services 461</p> <p><b>Chapter 11: Designing Graphical Interfaces 463</b></p> <p>Covering the Basics of GUIs in Java 464</p> <p>Highlighting the Built‐In GUI Libraries 464</p> <p>Abstract Window Toolkit (AWT) 464</p> <p>Swing 464</p> <p>Standard Widget Toolkit (SWT) 465</p> <p>JavaFX 465</p> <p>Other Toolkits and Libraries 466</p> <p>Choosing a GUI Library 466</p> <p>Building with Containers and Components 467</p> <p>Looking at the Full Picture 472</p> <p>Comparing Layout Managers 473</p> <p>FlowLayout 474</p> <p>BorderLayout 476</p> <p>GridLayout 478</p> <p>GridBagLayout 482</p> <p>CardLayout 486</p> <p>BoxLayout 489</p> <p>GroupLayout and SpringLayout 493</p> <p>Absolute Positioning (No Layout Manager) 494</p> <p>Understanding Events 496</p> <p>Introduction to Events 496</p> <p>Event Listeners 497</p> <p>On Threading and Swing 514</p> <p>Closing Topics 524</p> <p>Best Practices: Keeping Looks and Logic Separated 524</p> <p>Let’s Draw: Defining Custom Draw Behavior 525</p> <p>Visual GUI Designers: Making Life Easy? 540</p> <p>JavaFX: The Road Ahead? 545</p> <p><b>Chapter 12: Using Object‐Oriented Patterns 557</b></p> <p>Introduction to Patterns 558</p> <p>Object‐Oriented Patterns 558</p> <p>Creational Patterns 559</p> <p>Singleton Pattern and Static Utility Class 559</p> <p>Service Provider Pattern and Null Object Pattern 565</p> <p>(Abstract) Factory Pattern 566</p> <p>Structural Patterns 568</p> <p>Adapter Pattern 568</p> <p>Bridge Pattern 570</p> <p>Decorator Pattern 571</p> <p>Facade Pattern 574</p> <p>Composite Pattern 575</p> <p>Type Pattern and Role Pattern 583</p> <p>Behavioral Patterns 591</p> <p>Chain‐of‐Responsibility Pattern 591</p> <p>Observer Pattern and Model‐View‐Controller Pattern 592</p> <p>Iterator Pattern 605</p> <p>Visitor Pattern 607</p> <p>Template Method Pattern 610</p> <p>Strategy Pattern 612</p> <p>Helpful Libraries 614</p> <p>Apache Commons 614</p> <p>Google Guava 615</p> <p>Trove 615</p> <p>Colt 615</p> <p>Lombok 616</p> <p>OpenCSV 616</p> <p>HTML and JSON Libraries 616</p> <p>Hibernate and Other JPA‐Compliant Libraries 617</p> <p>Joda‐Time 617</p> <p>Charting Libraries 617</p> <p>3D Graphics Libraries 617</p> <p>Financial Libraries 618</p> <p>Index 619</p>
<p>About the authors</br> <b>Bart Baesens</b> is a professor at KU Leuven and a lecturer at the University of Southampton, where he teaches various programming and database management courses. <p><b>Aimée Backiel</b> is a doctoral researcher at KU Leuven. She teaches basic programming in Java to learners from diverse backgrounds. <p><b>Seppe vanden Broucke</b> is a postdoctoral researcher at KU Leuven. He uses Java daily, giving him insight into useful applications for practitioners. <p>Visit us at wrox.com where you have access to free code samples, Programmer to Programmer forums, and discussions on the latest happenings in the industry from around the world.
<p><b>Start programming with Java today</b> <p><i>Beginning Java Programming, The Object-Oriented Approach</i> is your introduction to Java. Providing hands on experience, this comprehensive beginner's guide gives you practical examples and real-world problems that will test your skills and provide a deep understanding of tasks, including getting Java to talk to your data, creating a graphical user interface, and much more. With complete coverage of basic concepts, syntax, external data, GUIs, and patterns, you will quickly become familiar with one of the most popular programming languages. <p><i>Beginning Java Programming: The Object-Oriented Approach</i> <ul> <li>Understand the basic concepts of Java, and the effective use of object-oriented patterns to streamline the developer's workflow</li> <li>Examine Java-specific syntax and language characteristics, and learn how the concepts of the object-oriented approach are implemented</li> <li>Use Java to quickly and easily access and manipulate external data stored in files, databases, and web sources</li> <li>Create applications users love to work with by designing efficient, accessible, attractive graphical user interfaces</li> <li>Test your skills on real-life IDE-based business and educational applications that demonstrate each concept</li> <li>Squash bugs and avoid programming errors by learning how to debug and test your applications.</li> <li>Familiarize yourself with the concept of best practice object-oriented design patterns to structure your projects.</li> </ul> <p><b>Wrox Beginning guides</b> are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that will guide you through all the techniques involved.

Diese Produkte könnten Sie auch interessieren:

Domain Architectures
Domain Architectures
von: Daniel J. Duffy
PDF ebook
31,99 €