Learning JAVA from (DAY 1 Note) <supplemental record>, java
A colleague's Mr (hereinafter referred to as the "Great God") is developed and senior in their company's core technical department.
Fortunately, Jack is happy to help me with this Chinese cabbage and guide me in my spare time. Thank you very much.
I will ask some questions in the next time, so that I can learn with questions.
The first time that Jack gave me his stay was:
① What are the basic data types of java?
A: byte short int float double boolean char
(The original String is not the basic data type !)
② What is the difference between the basic data type and the reference data type?
A: The variable name of the referenced data type points to the memory address, unlike the basic data type, which is a direct value. (See figure 1 below)
(Originally, String belongs to the reference data type, which is special and immutable, that is, final)
③ What is the difference between a class and an object?
A: A class is an abstract concept. It does not carry any data, but an object is a concrete object of a class. It is a real thing. Each object has its own unique attributes and behaviors different from other objects. The attributes of an object can change with its own behavior.
④ How to create an object?
A: I only know that a new object is generated. I checked it later. There are many methods for creating objects. (It means some are not very understandable)
1. Use the new statement to create an object. This is the most common method to create an object;
2. Call the clone () method of the object;
3. Use reflection to call the newInstance () instance method of Java. lang. Class or java. lang. reflect. Constructor Class;
4. Use deserialization to call the readObject () method of the java. io. ObjectInputStream object.
What types of classes are there?
A: It is classified into general and internal classes, and internal classes are classifiedMember internal class, local internal class, anonymous internal class, static internal class. (Internal departments and classes only have a vague understanding and cannot be used .)
I have graduated from college for more than three years. I have never been in touch for more than three years. I forgot about it. I learned and accumulated more slowly.
There may be something wrong with your notes.