java made easy

Discover java made easy, include the articles, news, trends, analysis and practical advice about java made easy on alibabacloud.com

Reading notes--effective Java; directory structure, easy to review and find

exceptions for programming errors 59th: Avoid unnecessary use of the exception that is examined 60th: try to use the standard exception 61st: throws an exception corresponding to the abstract 62nd: All exceptions thrown by each method must have a document 63rd: contains the failure-capture information in the detail message 64th: Try to keep the failure in the Atomic 65th Bar: Do not ignore exceptions chapter 10th Concurrent 66th: Synchronizing access to shared variable data 67th: Avoid too many

Encapsulating JDBC makes it easy to understand the Java reflection mechanism

= clazz.newinstance ();ResultSetMetaData RSMD = Rs.getmetadata ();for (int i = 1; I String columnName = Rsmd.getcolumnname (i);for (Field f:fields) {if (Columnname.equalsignorecase (F.getname ())) {Object Columnvalue = Rs.getobject (columnName);String methodName = Setmethodname (F.getname ());Method method = Clazz.getmethod (Methodname,f.gettype ());//Returns the Get method based on the type of Get method name and propertyMethod.invoke (entity, columnvalue);//Wake Get Method (Let get method tak

Total Pages: 8 1 .... 4 5 6 7 8 Go to: Go

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.