string literal constant
StringBuffer string variable (thread safe, slow)
StringBuilder string variable (non-thread safe, fast)
1. Speed onstringbuilder>stringbuffer>string2. Use:The operation of StringBuffer, StringBuilder, is to change on the original object. When you manipulate a string, you create a new object.
Memory overflow out of memory, refers to the program in the application of the RAM, there is not enough memory space for its use, there is an out-of-memory; for example, an integer is applied, but a long can be stored to save it.
Memory leak memories leak, refers to the program after the application of memory, can not release the requested memory space, a memory leak damage may be ignored, but the memory leak accumulation of serious consequences, no matter how much memory, sooner or later will be occupied.
Memory leak will eventually result in out of memory!
Memory overflow is the memory you require to allocate more than the system can give you, the system can not meet the demand, so overflow.
A memory leak is when you request a system to allocate memory for use (new), but you don't return it after you've used it (delete), and you can't access the memory you're applying to (maybe you lost the address), and the system can't assign it to the required program again. A plate with all kinds of methods can only Pack 4 fruit, you installed 5, the result fell on the ground can not eat. This is overflow! such as the stack, the stack when the stack is bound to create a space overflow, called overflow, stack empty and then do the fallback stack also produces a space overflow, called underflow. Is that the allocated memory is not enough to drop the sequence of data items called a memory overflow.
Learning materials viewed on the Internet