By Terrill Brett Spell

Pro Java eight Programming covers the center Java improvement package and the finer issues of the middle commonplace version (SE) and improvement equipment model eight. you will find the details of operating with the Java language and APIs to strengthen purposes in lots of varied contexts.

You also will delve into extra complex themes like lambda expressions, closures, new i/o (NIO.2), enums, generics, XML, metadata and the Swing APIs for GUI layout and improvement. by way of the top of the ebook, you’ll be absolutely ready to use Java's ease of improvement, and ready to create robust, subtle Java applications.

What you’ll learn

  • How to exploit and layout your personal libraries, periods and methods
  • How to take advantage of the recent lambda expressions, closures, circulation API and more
  • How to take advantage of the hot thread and I/O APIs for modern day Java functions that needs to practice at firm and parallel scales
  • How to take advantage of the enhanced collections APIs
  • How to construct a greater Java UI/UX utilizing structure managers, Swing's JTable and JTree APIs, cut-and-paste, and drag-and-drop
  • How to take advantage of Java Database Connectivity (JDBC) to attach and combine with numerous MySQL, Oracle, and NoSQL databases
  • How to paintings with internationalization, localization and more
  • How to successfully use XML and upload annotations on your Java purposes and more

Who this publication is for

This e-book is for skilled Java programmers or builders trying to additional refine or upload to their abilities and information base.

Table of Contents

1. Going inside of Java 8

2. Designing Libraries, periods, and Methods

3. Lambda Expressions and Closures

4. utilizing Threads on your Applications

5. utilizing circulate APIs and Collections

6. utilizing structure Managers

7. utilizing Swing’s JTable

8. utilizing Swing’s JTree

9. including Cut-and-Paste Functionality

10. including Drag-and-Drop Functionality

11. Printing

12. Introducing Java Database Connectivity (JDBC)

13. Internationalizing Your Applications

14. utilizing XML

15. including Annotations

Show description

Read or Download Pro Java 8 Programming PDF

Best object-oriented software design books

Java & XML: Solutions to Real-World Problems

With the XML ''buzz'' nonetheless dominating speak between web builders, there is a genuine have to how to reduce in the course of the hype and positioned XML to paintings. Java & XML exhibits find out how to use the APIs, instruments, and methods of XML to construct real-world functions. the result's code and information which are moveable. This moment version provides chapters on complex SAX and complicated DOM, new chapters on cleaning soap and information binding, and new examples all through.

Data Structures for Computational Statistics

Because the starting of the seventies laptop is offered to take advantage of programmable pcs for numerous initiatives. in the course of the nineties the has built from the large major frames to private workstations. these days it isn't basically the that is even more robust, yet workstations can do even more paintings than a first-rate body, in comparison to the seventies.

Object-Oriented Analysis, Design and Implementation: An Integrated Approach

The second one variation of this textbook contains revisions in accordance with the suggestions at the first version. In a brand new bankruptcy the authors offer a concise advent to the rest of UML diagrams, adopting a similar holistic process because the first variation. utilizing a case-study-based strategy for delivering a entire advent to the foundations of object-oriented layout, it includes:A sound footing on object-oriented innovations resembling sessions, gadgets, interfaces, inheritance, polymorphism, dynamic linking, and so forth.

Additional resources for Pro Java 8 Programming

Sample text

Figure 2-7. A shallow copy of an object is one that shares with the original object references to the same instances of other referenced objects 46 Chapter 2 ■ Designing Libraries, Classes, and Methods Shallow copies are sometimes acceptable, but not in all cases. For example, when you create a clone of an object, you’ll often do so intending to modify the contents of the clone without changing the original. In that case, a shallow copy may not be sufficient. For example, suppose you’re using the following class: public class MailMessage implements Cloneable { protected String sender; protected String recipient; protected StringBuffer messageText; public MailMessage(String from, String to, String message) { sender = from; recipient = to; messageText = new StringBuffer(message); } public StringBuffer getMessageText() { return messageText; } } If you use clone() to create a duplicate instance of this class, you’ll have a shallow copy that points to the same object instances as the original.

Public int hashCode() { return employeeID; } This would satisfy the first requirement mentioned previously because the value of employeeID would be used to determine equality and would be used as the hash code value. In other words, two instances that have the same employeeID value are considered equal to one another, and they will return the same hash code value. The second requirement is also satisfied, because as long as the employeeID value remains unchanged, the hashCode() method will return the same result each time it’s called.

Both methods add numbers together, and it’s necessary to decide which one should retain that functionality. One of the methods adds two numbers together, and the other adds zero or more numbers together. In other words, the first method provides a 57 Chapter 2 ■ Designing Libraries, Classes, and Methods subset of the functionality of the second one. Since that’s the case, you can eliminate the duplication by delegating responsibility for adding the two numbers to the more flexible method. The following is an alternative implementation: public class AddingMachine { /** * Adds two integers together and returns the result.

Download PDF sample

Rated 4.98 of 5 – based on 36 votes