20145311 Java programming Seventh week of study summary

Source: Internet
Author: User
Tags iso 8601 string format time and date

20145311 "Java Program design" Seventh week study summary textbook Learning content Summary 12th Chapter LAMBDA

Lambda expressions make programs more concise and can be processed in parallel when designed in parallel.

The 13th chapter time and date 13.1time&&date
13.1.1 Measurement of Time

1, Greenwich Mean Time (GMT) abbreviated to GMT to observe the sun
2, Universal time (World) UT
3. International Atomic Time (International Atomic) TAI
4. Coordinated Universal time (World coordinated) UTC
5, Unix time with January 1, 1970 00:00:00 as the starting point
6. Epoch
The current time actually refers to UTC time

13.1.2 Calendar

1. Julian calendar (Julian calendar) four years a leap
2. Gergorian Calendar (Gregorian calendar)
3. ISO 8601 Standard

13.1.3Time Zones (timezone)

The number of milliseconds in a year is notsimple 3651000

13.2date&&calendar
13.2.1Date

The epoch milliseconds can be obtained using each gettime of the date instance, and the **data instance is used only as a moment on the timeline

13.2.2DataFormat (formatted time date)

DataFormat can be used to process the string format, respectively, Getdateinstance, Gettimeinstance, getdatetimeinstance
Directly build SimpleDateFormat, you can customize the string format the parse method can dissect a specified string into a date instance

13.2.3Calendar

After obtaining the calendar instance, you can get the date information, can be set, can be calculated to change

13.2.4TimeZone

TimeZone Getdefault can get information for the default time zone

13.3 New Time Date API
13.3.1 Machine Time View

The date instance represents only the time information of the machine view

13.3.2 Human Time Perspective

Lockaldatetime, Localdate, localtime are not time zone information
On top of those classes can be supplemented by using zoneddatetime, etc.
Gets the month through the GetValue () method instead of using the oridinal () (starting from 0) method

13.3.3 the operation of time

Calendar can be used for time operations, JDK8 also provides a more convenient time calculation method and output format, operation of the corresponding temporal class can be

13.3.4 Calendar System Design

Classes in the Java.time.chrono class with relevant calendar systems

Problems in teaching materials learning and the solving process

The date instance can only be used as an instant on the timeline, need to be converted, and the time of year is not 365*24*60*60*1000, there are many different. Machine time and human time is still different, the design process should be used correctly, in the human time point of view also pay attention to the different calendars and time zone problems, otherwise there will be some inaccuracies (time is quite complicated).

Problems in code debugging and the resolution process

Other (sentiment, thinking, etc., optional)

This week's study is mainly time and date, in fact, Java has such a number of classes, the operation of these classes can be expressed in the corresponding time and some output format of the time to express, there is the time to operate, the most critical is good at using the API help documents, when needed to be able to use these classes flexibly.

Learning progress Bar

Lines of code (new/cumulative Blog volume (cumulative/target) Study time Estimating Learning Time Actual learning Time Important growth
Goal 5000 rows 30 Articles 400 hours
First week 150/150 2/2 15
Second week 500/650 3/4 15
Third week 500/1150 4/5 14

Week Four 600/1750 5/6 15
Week Five 500/2250 6/7 9 I didn't learn much this week.
Week Six 300/2350 7/8 10 Learning is still untrue, but better than last week
Seventh Week

This week wrote about 300 lines of code (including experiments),

Some of the code is directly pasted run and look at the results

10/10

8~9h

10h

8h~9h

This week's study content is mainly the time, the date correlation class application,

Compared to the previous chapters, it's a bit simpler,

The actual learning time is less than the estimated learning time,

The time spent reading is about the same as the estimate,

But write code, debug, do practical application,

Learning Java experiments related debugging skills, testing skills time or less, or a little lazy.

Resources
    • Java Learning Notes (8th Edition)
    • Java Learning Note (8th Edition) Learning Guide
    • ...

20145311 Java programming Seventh week of study summary

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.