1. Manipulate the object (TV) with a reference (remote control):String s = "asdf";
2. All objects must be created by you:string s = new String ("asdf");
2 (1). Where to store:Registers (fast, cannot be controlled directly), stacks (1. If the stack pointer moves down, the new memory is allocated, and if you move up, the memory is freed.) 2.Java data is stored on the stack-especially object references-and Java objects are not stored in them. The 3.Java system must know the exact life cycle of all items stored within the stack to move the stack pointer up or down. Heap (1. You do not need to know how long the stored data will survive in the heap, but simply write a simple line of code 2 with new when you need the object. Storage allocation and cleanup with stacks can take more time than storage allocation with stacks), constant storage, non-RAM storage,
2 (2) Exception: Basic type:Boolean, char (bits), byte (8 bits), short (BITS), int (bits), long (bits), float (bits), double (bits), void
2 (3) Arrays in Java
3. Never need to destroy objects
3 (1). Scope:The scope is determined by the position of the curly brace, and the variable defined in the scope is only available until the scope ends
3 (2). Scope of the object:When you create a Java object with new, it can survive outside the scope.
4. Create a new data type: Class
4 (1). Fields (data members) and methods (member functions)
5. Methods, parameters, and return values:Method: Name, parameter, return value and method body; int x = A.F ();//message is F (), object is a
5 (1). parameter list:Type and name
6. Build a Java program:Name Visibility (package), use other artifacts (import), static keyword (1. You can call its static method or access its static domain 2 even if you have never created any objects of a class. Only one copy of storage space)
7. Your first Java program:Compiling and running
8. Annotations and embedded Documents
8 (1). Note Document
8 (2). Syntax:Javadoc (/** */)
8 (3). Embedded HTML: (/** */) do not use the title tag in embedded HTML, Javadoc will insert its own title, and your title may conflict with them.
8 (4). Some examples of tags
8 (5). Documentation Examples
9. Coding style
Java Programming thought note (Everything is an object)