20145123 Liu Senming "Java Programming" Eighth Week study summary

Source: Internet
Author: User

Code Hosting Address: Summary of learning contents of http://git.oschina.net/null_289/Java2016 Textbook

I. Log API

The starting point for using the log is the logger class, where the logger instance is created with many features to be processed, and the constructor for the logger class is identified as protected. Classes that are not java.util.logging are not created directly with new, and to get logger instances, you must use Logger's static method GetLogger ().

Call GetLogger () Yes, you must specify the namespace to which the logger instance belongs, with the namespace "." As a hierarchical distinction, the logger of the same namespace level is the same as the parent logger configuration.

The logger that is usually obtained in that class, the namespace is named the full name of that class.

Two. Internationalization Basics

Application according to different regional users, rendering different languages, date formats and so called localization, if the application design can not modify the application situation, according to different users directly adopt different language date format, such design considerations become internationalized, referred to as i18n.

The three important concepts of internationalization are regional information, resource bundles, and base names. The corresponding class Locale,resourcebundle object of the region information is the representative object of the resource bundle in the JVM. Each resource bundle that represents the same group of information but different regions share the same underlying name, and the name specified when you use Resourcehandle's Getbundle () is specifying the underlying name.

Using Reasourcebundle is how to obtain the corresponding information document based on the underlying name:

    1. Gets the information document using the specified Locale object.
    2. Use the object obtained by Locale.getdefault () to obtain an information document.
    3. Obtaining information documents using the underlying name

You can use date to get the full date time, use ToString () to get a date literal description, or use DateFormat to format the date. If you look at the API file for date, you will find that many methods are no longer recommended, and we recommend using calendar-related methods instead.

Learning progress Bar
Number of lines of code Study time Number of Blogs Learning sentiment
Goal 4000 300 30
Seventh Week 400/2570 10/93 2/10
Eighth Week 500/3070 15/108 2/12

20145123 Liu Senming "Java Programming" Eighth Week study summary

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.