1. Java will process everything as an object. Through the object's Reference manipulation object, Reference can exist alone. When it is not assigned objects, it does not make sense as the pointer defined in C . Defining an object just defines its Reference, defining the String type object can be initially trial directly with the text enclosed in quotation. 2. After you create the object's Reference, you can connect the object to the above, the New keyword is used to create a new type of object. The Reference of Automatic Objects in Java is stored in the stack, and the Reference of the Static object is stored in a static storage area, and all objects are stored in the stack memory, while constants are stored in the program area. 3, Persistent object: You can save objects on disk and you can reconstruct it from memory when you need it. 4, Primitive Type: Primitive Type Includes Boolean, CHAR, BYTE, SHORT, INT, LONG, DOUBLE, VOID and other data types, which is Java inherited C / C automatic variable mode, stores the object directly in the stack. Unlike C / C , all of its digital types are symbol, and each type is not due to machine changes. At the same time, the PRIMITIVE type Wrapper class allows you to create an object that represents the primitive type data in the heap. This object is not a Primitive type, call it to use its reference. 5, high precision value: Two classes in the Java's Wrapper class: Biginteger and BigDecimal, which provide methods that simulate the primacy type operation and support higher accuracy. 6, Java array: Java in the middle group will definitely be initialized, and its access range is defined. When you create an object array, actually created an object's Reference array, which will be automatically initialized to null; create a Primitive array when compiled it to zero. 7. Objects in Java: C / C variables and Javage variables in Java, the scope of the REFERENCE of the object is determined by {}, but Java does not support the same name variable scope mask function in C / C . The object's Reference will disappear after the scope ends, but the objects in the stack still account for memory, and the Java garbage collector automatically cleans the heap objects created with new NEW. 8, class in Java: Java class contains two elements of data and methods, and the data can be a reference type or a Primitive type. Primitive Type As a class of data, it is always initialized, which has a set of default initialization values. The method name and its parameter list are uniquely identified by the method name and its parameter list, indicate the object type and name of the method, and actually transmits the object's Reference. The method of calling the object is to send a message to the object. If the method is not returned value, it is necessary to indicate the return type of the method to void. 9, Java Program: The visibility of the name: C uses the visibility of the namespace management name, Java implements the management of the namespace through the reverse domain name. Components Use: Java by using IMPORT to specify components in the class library, and support wildcard *, where references to standard Java class libraries can be omitted.
STATIC member: The class Static member is not connected to any instance of the class, so even if any object can also access its Static data or call the Static method, the STATIC member of the access class can pass the object name, or by the class name access. Static data is only one copy of each class. All objects of the class are shared; the Static method can be called without creating an object, often used to implement the management of the class, which is often a STATIC data or the object of the class. 10, the first Java program: Java standard class library in the Java Standard Class library will automatically introduce all Java files, and other class libraries will be introduced with the import statement. The class library structure see the JDK document (Date method belongs to java.util.date Class, OUT is the STISTEM class Static data member, which is a PrintStream class object, and the method println in the printStream class is used to print the parameter String type content and print to the console). When creating a standalone program, the file name must be the same as the class name where the method main, the MAIN method is formatted: public static void main (strint [] args). 11, compile operation: Install JDK and set up java_home variables in the environment variable, compile: Java program name, run: Java file name. Use the ANT command to automatically compile the Java program. 12, Note and Embedded Documents: Note and C in Java. The embedded document refers to the addition of special tags in Java's program comments so as to extract documents from Javadoc, and Javadoc can generate documents in HTML format, and Doclets can perform special processing for some information. 13. Javadoc syntax: All javadoc commands are started by / ** comment, * / end, notes, and definitions can't have anything. Javadoc has two main usages: embedded HTML and document tags. By default, Javadoc processes only processes the class's public and protected comment documents. Embedded HTML: In the comment document, the HTML command is included, mainly for typography, and Javadoc will rearrange everything. Tag document: stand-alone document tag: starting with @ and being started at the beginning of the note; the embedded document mark: Inclusive in {} and @ start, you can put anywhere in the comment. 14. Document mark example: Embedded: {@ link package.class # Member Label} Other classes in Label as a hyperlink reference document, {@ DOCROOT} returns to the relative path of the document directory, {@ inheritdoc} Documents with this class's most recent base class inherit into the current document. Separate: @see Take the other class in the super link in See Also, @ version version-information identification version information, @ Author Author-Information identifies the author information, @ Since indicates the version of some feature, @ param parametername Description tag The parameters of the method and its information, the @ Return Description tag return value information, @ throws full-qualified-class-name description is the reason for the unusual name DESCRIPTION to produce an exception.