Learn java from 0 O ' Day 1 Notes < supplemental records >

Source: Internet
Author: User
Tags float double

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 >

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.