楼主: xpf7622
1948 11

[作业] Java 9 Recipes A Problem Solution Approach 3rd Edition [推广有奖]

  • 0关注
  • 7粉丝

博士生

84%

还不是VIP/贵宾

-

威望
0
论坛币
25477 个
通用积分
18.9399
学术水平
19 点
热心指数
25 点
信用等级
8 点
经验
24470 点
帖子
190
精华
0
在线时间
238 小时
注册时间
2007-9-6
最后登录
2024-4-25

相似文件 换一批

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币

Release 出版日期: 2017-06-29

pages 页数: (626)
Quickly find solutions to dozens of common programming problems encountered while building Java applications. Content is presented in the popular problem-solution format. Look up the programming problem that you want to resolve. Read the solution. Apply the solution directly in your own code. Problem solved!

This revised edition covers important new features such as Java 9’s JShell and the new modularity features enabling you to separate code into independent modules that perform discrete tasks. Also covered are the new garbage collection algorithm and completely revamped process API. Enhanced JSON coverage is provided as well as a new chapter on JavaServer Faces development for web applications.

What You’ll Learn
Develop Java SE applications using the latest in Java SE technology
Exploit advanced features like modularity and lambdas
Use JShell to quickly develop solutions
Build dynamic web applications with JavaScript and Project Nashorn
Create great-looking web interfaces with JavaServer Faces
Generate graphics and work with media such as sound and video
Add internationalization support to your Java applications
Who This Book Is For
Both beginning Java programmers and advanced Java developers

Cover:

51jLP24 2VL._SL160_pfxie.jpg

download:

Java 9 Recipes A Problem Solution Approach 3rd Edition.pdf (6.33 MB, 需要: 15 个论坛币)



二维码

扫码加我 拉你入群

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

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

关键词:Solution Approach Edition problem solutio Java important presented building directly

本帖被以下文库推荐

沙发
ReneeBK 发表于 2017-7-1 23:33:12 |只看作者 |坛友微信交流群
  1. 4-14. Comparing Two Dates
  2. Problem
  3. You want to determine if one date is greater than another.
  4. Solution
  5. Utilize one of the compareTo() methods that are part of the Date-Time API classes. In the following solution,
  6. two LocalDate objects are compared and an appropriate message is displayed.
  7. public static void compareDates(LocalDate ldt1,
  8. LocalDate ldt2) {
  9. int comparison = ldt1.compareTo(ldt2);
  10. if (comparison > 0) {
  11. System.out.println(ldt1 + " is larger than " + ldt2);
  12. } else if (comparison < 0) {
  13. System.out.println(ldt1 + " is smaller than " + ldt2);
  14. } else {
  15. System.out.println(ldt1 + " is equal to " + ldt2);
  16. }
  17. }
复制代码

使用道具

藤椅
ReneeBK 发表于 2017-7-1 23:34:56 |只看作者 |坛友微信交流群
  1. 4-15. Finding the Interval Between Dates and Times
  2. Problem
  3. You need to determine how many hours, days, weeks, months, or years have elapsed between two dates or times.
  4. Solution 1
  5. Utilize the Date-Time API to determine the difference between two dates. Specifically, make use of
  6. the Period class to determine the period of time, in days, between two dates. The following example
  7. demonstrates how to obtain the interval of days, months, and years between two dates.
  8. LocalDate anniversary = LocalDate.of(2000, Month.NOVEMBER, 11);
  9. LocalDate today = LocalDate.now();
  10. Period period = Period.between(anniversary, today);
  11. System.out.println("Number of Days Difference: " + period.getDays());
  12. System.out.println("Number of Months Difference: " + period.getMonths());
  13. System.out.println("Number of Years Difference: " + period.getYears());
复制代码

使用道具

板凳
ReneeBK 发表于 2017-7-1 23:36:51 |只看作者 |坛友微信交流群
  1. 4-16. Obtaining Date-Time from a Specified String
  2. Problem
  3. You want to parse a String into a date-time object.
  4. Solution
  5. Utilize the parse() method of a temporal date-time class to parse a String using a predefined or custom
  6. format. The following lines of code demonstrate how to parse a String into a date or date-time object using
  7. variations of the parse() method.
  8. // Parse a String to form a Date-Time object
  9. LocalDate ld = LocalDate.parse("2014-12-28");
  10. LocalDateTime ldt = LocalDateTime.parse("2014-12-28T08:44:00");
  11. System.out.println("Parsed Date: " + ld);
  12. System.out.println("Parsed Date-Time: " + ldt);
  13. // Using a different Parser
  14. LocalDate ld2 = LocalDate.parse("2014-12-28", DateTimeFormatter.ISO_DATE);
  15. System.out.println("Different Parser: " + ld2);
  16. // Custom Parser
  17. String input = "12/28/2013";
  18. try {
  19. DateTimeFormatter formatter = DateTimeFormatter.ofPattern("MM/dd/yyyy");
  20. LocalDate ld3 = LocalDate.parse(input, formatter);
  21. System.out.println("Custom Parsed Date: " + ld3);
  22. } catch (DateTimeParseException ex){
  23. System.out.println("Not parsable: " + ex);
  24. }
复制代码

使用道具

报纸
Nicolle 学生认证  发表于 2019-8-18 23:58:13 |只看作者 |坛友微信交流群
提示: 作者被禁止或删除 内容自动屏蔽

使用道具

地板
Nicolle 学生认证  发表于 2019-8-19 00:00:21 |只看作者 |坛友微信交流群
提示: 作者被禁止或删除 内容自动屏蔽

使用道具

7
Nicolle 学生认证  发表于 2019-8-19 00:02:03 |只看作者 |坛友微信交流群
提示: 作者被禁止或删除 内容自动屏蔽

使用道具

8
Nicolle 学生认证  发表于 2019-8-19 00:09:56 |只看作者 |坛友微信交流群
提示: 作者被禁止或删除 内容自动屏蔽

使用道具

9
Nicolle 学生认证  发表于 2019-8-19 00:13:54 |只看作者 |坛友微信交流群
提示: 作者被禁止或删除 内容自动屏蔽

使用道具

10
Nicolle 学生认证  发表于 2019-8-19 00:18:02 |只看作者 |坛友微信交流群
提示: 作者被禁止或删除 内容自动屏蔽

使用道具

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

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

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

GMT+8, 2024-4-26 12:45