A colleague of the Mr. (Shinta) is doing the development, the more senior kind, in their company's core technology department.
Fortunately, Shinta is happy to help me with this Chinese cabbage, in my spare time to guide me, here is deeply grateful.
Geng God interval time will give me some questions, let me take the problem to learn.
The first question that Shinta left me was:
What are the underlying data types for ①java?
Answer: byte short int float Double Boolean char
(The original string is not the underlying data type!) )
② What is the difference between the underlying data type and the reference data type?
A: The variable name of the reference data type points to the memory address, unlike the base data type, which is a direct numeric value. (Borrow the chart below)
(The original string is a reference data type and is a special, immutable string, which is final)
What is the difference between a ③ class and an object?
A: A class is an abstract concept that itself does not carry any data, whereas an object is a concrete and tangible thing of a class. Each object has its own unique properties and behaviors that are distinct from other objects. The properties of an object can change as its own behavior occurs.
④ How do I create an object?
A: I only know a new object, and then went to the next, there are quite a variety of methods to create objects. (some don't really understand)
1. Create objects with the new statement, which is the most common way to create objects;
2. Call the object's clone () method;
3. Using the Reflection method, call the Java.lang.Class or Java.lang.reflect.Constructor class of newinstance () instance methods;
4. Invoke the ReadObject () method of the Java.io.ObjectInputStream object using the deserialization means.
What kinds of ⑤ are there?
A: The general class and the inner class, the inner class is also divided into member inner class, local inner class, anonymous inner class, static inner class. (There is only a vague understanding of the inner class, which cannot be applied.) )
College graduates more than three years, more than three years without contact, forgotten almost, slowly learn, slowly accumulate.
The notes may be wrong, and the great Gods who pass by are pointing.
Learn java from 0 O ' Day 1 Notes < supplemental records >