May 3 class Notes-properties file, JUnit test, MVC seal layer, etc.

Source: Internet
Author: User

stringbuffer thread safety, low efficiency StringBuilder thread insecure, high efficiency determine if an array is null or emptyNULLEmpty Arrayint[] array=NULL; int[] array2=New int[]{}; Create several objects?String S=NewString ("Guan Yu"); Two objects created1.*read the Properties profile dbinfo.properties A. Reflected ClassLoader reads configuration file reflection: Maps the various components of a class to the corresponding class B . Tool class ResourceBundle ResourceBundle bundle= Resourcebundle.getbundle ("Cn/test/dbinfo");//incoming file name, no suffix requiredString age = bundle.getstring (' Age ');      System.out.println (age); 2the method return type for unit test JUnit JUNIT4 unit tests must be void to add annotations @Test import JUNIT4 assertions: Actual results Whether to match expected result Assert.assertequals (expected result, actual result)3. MVC Layered M----model (models layer) generally refers to JavaBean V----The view layer refers to the page at the Web stage, and in U1 generally refers to the console C----controller (Control layer) is to forward the user request to the model layer, after processing the results back to the interface layer presented in a middle-tier project sub-package M---bean Pojo Domain V----Store page C:dao data Operations Daoimpl service business logic Serviceimpl        Cn.bdqn.pojo Cn.bdqn.dao Cn.bdqn.dao.impl Cn.bdqn.service Cn.bdqn.service.impl Cn.bdqn.test

May 3 class Notes-properties file, JUnit test, MVC seal layer, etc.

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.