Techniques that Java programmers should master

Source: Internet
Author: User

1. Read and write JSON data, as well as strings, the Java objects are transferred to each other

Common JSON libraries: Gson, JSON,

Using JSON constructs, tree structure and so on, application

2. XML, read and write parsing of properties configuration,

Properties file parsing, can use java.util.Properties to read and write

Parsing, Dom,sax, parsing of XML files, common library dom4j, jdom

Apache Digester: This library can convert an XML file into a Java object. This method that Tomcat uses when parsing Web. Xml.

http://commons.apache.org/proper/commons-digester/

3. Access to resource files

Reads, specifies the directory under which the file is in a different context. such as common Java programs, Java Web Programs, spring Web containers, etc...

Read converted to File object

4. Use of java.io and Java.nio packages

Files, strings, byte arrays, and other streams, operations, uses, and features of various stream classes

5. Use the log to record debug information, warning messages, and error messages in the system

Be sure to use the log to record the information above, not system.out.print.

Common logs:slf4j and log4j

and the log package that comes with the JDK java.util.logging

The comparison between the three http://www.importnew.com/7450.html

Techniques that Java programmers should master

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.