Java common Sense and fun notes

Source: Internet
Author: User

such as String use Strxxx
Boolean using Isxxx,hasxxx

New Vector (); Array aryusersNew


Classes and Interfaces

Basic principles:
A class only does one thing. Another principle is divided according to the responsibilities of each class, such as
Users to store user information, and use Userdao to data access to user information, with Userserver to the user
Information, business operations, and so on. When using the same method in more than one class, refer its method to an interface or use an abstract class.
Try to improve the reuse level. You do not want the default constructor method of the class being instantiated to be declared private.

Multiplication and division try to use shift << and >>

Cute notes:

Originally I also know what I am writing and now, only God know.
Originally I knew what I was writing, but now, only God knows.
There is something wrong with the code don ' t find me! Although I wrote, but they themselves grow slanting.
There's a problem with the code don't call me! I wrote them, but they were crooked.
 This , it means that is now in  charge of my previous projects. I feel very sorry. May God bless you. If you see this, then you are now in charge of my previous project. I am very sorry. May God bless you. 
0 can't do divisor, no way I had to use a very similar value instead: 0=0.00000000000001
if  Do not know who wrote it. If the code is useful, they're written by Sky, and if it doesn't, I don't know who wrote it. 

Java common Sense and fun notes

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.