Tag:os ar use    JAVA   SP 2014 bs work ef
Today's work does not have anything to do, opened on the table has been a long time Java crazy handouts to see a look, alas, really embarrassed to say that they are learning programming, record points, accumulate points, do not want to become a great God, hope that the work should not be illiterate.
1, Chang: String a= "Java"; Java "is placed in a constant pool. and placed in new string ("Java") memory, so each new string () will produce an object.
2, the basic type variable is converted to the string method:int n=1; String str=n+ "";
3:tostring () method: An instance method in object that returns the class name of the object implementation class [email Protected] +hashcode "value. When the
4:equals and ==:== base types are compared, the values are equal and return true, when the reference object comparison must point to the same object to return true; when strings are compared using equals, the values are equal and return true;
5: Automatic unboxing Box: The basic type is directly assigned to the wrapper class object, the wrapper class object is copied directly to the basic type; Wrapper class object General method: Basic type and String type conversion: Xxx.parsexx ()--string conversion to basic type; The base type is converted to a string: string.valueof ();
The use of the
6:static, the decorated member is a class member, and the class member belongs to the class, not to an object. An object called a class member is actually a delegate class that invokes a class member. Singleton class: A class that can create only one instance, which must be implemented through a class, so the constructor must be a static adornment for the class member, create an instance in the constructor, and the next object to be created is this instance, thus enabling only one instance to be created.
2014/10/22 Java basic knowledge Record (1)