楼主: 大家开心
2609 10

Pro Java 8 Programming [推广有奖]

泰斗

25%

还不是VIP/贵宾

-

TA的文库  其他...

大家开心文库

威望
9
论坛币
1025446 个
通用积分
583.7120
学术水平
3617 点
热心指数
3599 点
信用等级
3043 点
经验
604082 点
帖子
1851
精华
204
在线时间
1999 小时
注册时间
2013-10-3
最后登录
2024-4-25

初级学术勋章 初级热心勋章 中级学术勋章 中级热心勋章 初级信用勋章 高级学术勋章 高级热心勋章 中级信用勋章 特级学术勋章 高级信用勋章 特级信用勋章

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

Pro Java 8 Programming covers the core Java development kit and the finer points of the core standard edition (SE) and development kit version 8. You'll discover the particulars of working with the Java language and APIs to develop applications in many different contexts.

You will also delve into more advanced topics like lambda expressions, closures, new i/o (NIO.2), enums, generics, XML, metadata and the Swing APIs for GUI design and development. By the end of the book, you’ll be fully prepared to take advantage of Java's ease of development, and able to create powerful, sophisticated Java applications.

What you’ll learn
  • How to use and design your own libraries, classes and methods
  • How to use the new lambda expressions, closures, stream API and more
  • How to use the new thread and I/O APIs for today's Java applications that must perform at enterprise and parallel scales
  • How to use the improved collections APIs
  • How to build a better Java UI/UX using layout managers, Swing's JTable and JTree APIs, cut-and-paste, and drag-and-drop
  • How to use Java Database Connectivity (JDBC) to connect and integrate with various MySQL, Oracle, and NoSQL databases
  • How to work with internationalization, localization and more
  • How to effectively use XML and add annotations to your Java applications and more

Who this book is for

This book is for experienced Java programmers or developers looking to further refine or add to their skills and knowledge base.

Table of Contents

1. Going Inside Java 8

2. Designing Libraries, Classes, and Methods

3. Lambda Expressions and Closures

4. Using Threads in Your Applications

5. Using Stream APIs and Collections

6. Using Layout Managers

7. Using Swing’s JTable

8. Using Swing’s JTree

9. Adding Cut-and-Paste Functionality

10. Adding Drag-and-Drop Functionality

11. Printing

12. Introducing Java Database Connectivity (JDBC)

13. Internationalizing Your Applications

14. Using XML

15. Adding Annotations

51LopdpbaUL.jpg

本帖隐藏的内容

Pro_Java_8.zip (4.12 MB, 需要: 3 个论坛币) 本附件包括:
  • Pro_Java_8.epub




二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Programming Program gram Ming Java Java different discover standard version

已有 3 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
Nicolle + 100 + 100 + 1 + 1 + 1 精彩帖子
statax + 40 + 2 奖励积极上传好的资料
crystal8832 + 50 + 2 + 2 + 2 奖励积极上传好的资料

总评分: 经验 + 100  论坛币 + 190  学术水平 + 3  热心指数 + 5  信用等级 + 3   查看全部评分

本帖被以下文库推荐

沙发
Elena3 发表于 2015-6-2 23:06:13 |只看作者 |坛友微信交流群

Loose Coupling

Coupling refers to the degree to which classes depend upon one another, and two classes that are highly dependent upon each other are considered tightly (sometimes called highly) coupled. Coupling is inevitable in some cases because classes must maintain references to one another and perform method calls. However, when you implement a class that’s a good candidate for reuse, you should limit its dependencies on other classes as much as possible. It’s often not obvious how to do this because you usually can’t simply eliminate the interaction between classes. In many cases, it’s possible to create a pure abstraction that handles the interaction between two classes or to shift the responsibility for the interaction to an existing class that you don’t intend to make reusable.

As an example, suppose you need to create a graphical component that allows you to select font properties, enter some sample text, and have that sample text displayed using the selected font properties. When the font or the sample text changes, the display should update to display the sample text value using the current font settings.

To satisfy these requirements, you might first create a class similar to the one in Listing 2-1, which defines a panel that allows you to select the font properties (name, size, bold, italic). (See Figure 2-1)

  1. Listing 2-1. The Initial FontPropertiesPanel Code

  2. import java.awt.*;
  3. import java.awt.event.*;
  4. import javax.swing.*;
  5. import javax.swing.event.*;

  6. public class FontPropertiesPanel extends JPanel {

  7.   protected JList<String> nameList;
  8.   protected JComboBox<Integer> sizeBox;
  9.   protected JCheckBox boldBox;
  10.   protected JCheckBox italicBox;

  11.   protected SampleTextFrame frame;

  12.   public final static int[] fontSizes = {10, 12, 14, 18, 24, 32, 48, 64};

  13.   public FontPropertiesPanel(SampleTextFrame stf) {
  14.     super();
  15.     frame = stf;
  16.     createComponents();
  17.     buildLayout();
  18.   }

  19.   protected void buildLayout() {
  20.     JLabel label;
  21.     GridBagConstraints constraints = new GridBagConstraints();
  22.     GridBagLayout layout = new GridBagLayout();
  23.     setLayout(layout);

  24.     constraints.anchor = GridBagConstraints.WEST;
  25.     constraints.insets = new Insets(5, 10, 5, 10);

  26.     constraints.gridx = 0;
  27.     label = new JLabel("Name:", JLabel.LEFT);
  28.     layout.setConstraints(label, constraints);
  29.     add(label);
  30.     label = new JLabel("Size:", JLabel.LEFT);
  31.     layout.setConstraints(label, constraints);
  32.     add(label);
  33.     layout.setConstraints(boldBox, constraints);
  34.     add(boldBox);

  35.     constraints.gridx++;
  36.     nameList.setVisibleRowCount(3);
  37.     JScrollPane jsp = new JScrollPane(nameList);
  38.     layout.setConstraints(jsp, constraints);
  39.     add(jsp);
  40.     layout.setConstraints(sizeBox, constraints);
  41.     add(sizeBox);
  42.     layout.setConstraints(italicBox, constraints);
  43.     add(italicBox);
  44.   }

  45.   protected void createComponents() {
  46.     GraphicsEnvironment ge =
  47.         GraphicsEnvironment.getLocalGraphicsEnvironment();
  48.     String[] names = ge.getAvailableFontFamilyNames();
  49.     nameList = new JList<String>(names);
  50.     nameList.setSelectedIndex(0);
  51.     nameList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  52.     nameList.addListSelectionListener(new ListSelectionListener() {
  53.       public void valueChanged(ListSelectionEvent event) {
  54.         handleFontPropertyChange();
  55.       }
  56.     }
  57.     );
  58.     Integer sizes[] = new Integer[fontSizes.length];
  59.     for (int i = 0; i < sizes.length; i++) {
  60.       sizes[i] = new Integer(fontSizes[i]);
  61.     }
  62.     sizeBox = new JComboBox<Integer>(sizes);
  63.     sizeBox.addActionListener(new ActionListener() {
  64.       public void actionPerformed(ActionEvent event) {
  65.         handleFontPropertyChange();
  66.       }
  67.     }
  68.     );
  69.     boldBox = new JCheckBox("Bold");
  70.     boldBox.addActionListener(new ActionListener() {
  71.       public void actionPerformed(ActionEvent event) {
  72.         handleFontPropertyChange();
  73.       }
  74.     }
  75.     );
  76.     italicBox = new JCheckBox("Italic");
  77.     italicBox.addActionListener(new ActionListener() {
  78.       public void actionPerformed(ActionEvent event) {
  79.         handleFontPropertyChange();
  80.       }
  81.     }
  82.     );
  83.   }

  84.   protected void handleFontPropertyChange() {
  85.     frame.refreshDisplayFont();
  86.   }

  87.   public String getSelectedFontName() {
  88.     return (String)(nameList.getSelectedValue());
  89.   }

  90.   public int getSelectedFontSize() {
  91.     return ((Integer)(sizeBox.getSelectedItem())).intValue();
  92.   }

  93.   public boolean isBoldSelected() {
  94.     return boldBox.isSelected();
  95.   }

  96.   public boolean isItalicSelected() {
  97.     return italicBox.isSelected();
  98.   }

  99. }
复制代码

使用道具

nice nice

使用道具

板凳
工人一号 发表于 2015-6-3 09:40:37 |只看作者 |坛友微信交流群
Pro Java 8 Programming

使用道具

报纸
仙潮 发表于 2015-6-5 20:47:12 |只看作者 |坛友微信交流群

thanks for sharing

使用道具

地板
KingPeter 发表于 2015-6-22 09:14:54 |只看作者 |坛友微信交流群
找了好久,可以免费下载吗?

使用道具

7
liuqin9198 发表于 2015-6-29 11:19:14 |只看作者 |坛友微信交流群

使用道具

8
Nicolle 学生认证  发表于 2015-7-27 07:38:50 |只看作者 |坛友微信交流群
提示: 作者被禁止或删除 内容自动屏蔽

使用道具

9
Nicolle 学生认证  发表于 2015-7-27 07:44:09 |只看作者 |坛友微信交流群

Listing 2-8. Adding Accessor and Mutator Methods

提示: 作者被禁止或删除 内容自动屏蔽

使用道具

10
Nicolle 学生认证  发表于 2015-7-27 07:45:58 |只看作者 |坛友微信交流群

Listing 2-9. Encapsulation Hides Implementation Details

提示: 作者被禁止或删除 内容自动屏蔽

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加JingGuanBbs
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-28 02:48