Java interview questions: in their own language to describe the classes and objects in Java

Face questions related searches:
the Java programming foundation spring recruit class face questions of (a)

Spring Java programming trick interview questions of the base class (B)

Today give you about a lower common interview questions:

In their own language to describe Java classes and objects

The following objects on which statement is true? Please select a correct answer.

(A) objects can be instantiated to obtain something like.

(B) objects are instances of classes.

(C) the object is a blueprint that allow you to create an abstract implementation.

(D) is a pointer to an object reference to the property.

(E) the object is a variable.

Test sites: The inspection job interview questions understanding of Java classes and objects.

The frequency of occurrence: ★★★

[A] face questions

1. class

When dealing with complex matters, an essential tool used in the abstract. The purpose is to abstract the essence of the difference between things and different, in essence, is the use of classes and objects in object-oriented programming (OOP) to establish the abstract model.

Class represents the class of the object, the object is to create a blueprint. Establish a thing of abstract model, it is an expression of the nature and behavior of things in nature. Used to create an abstract model classes, is accomplished by the variables and methods defined in the class.

Defined in the class is the attribute values ​​stored in the variable A, the variable representing the specific nature of things. Object class has rows defined by a method to achieve. Variables and methods defined in a class are called members of the class.

In the development of the project, the class may be represented by the general UML modeling, shown in Figure 1.1.
Here Insert Picture Description

Figure 1.1, the definition of class members Gun, i.e. Gun class variables and methods. UML diagrams from

Guess you like

Origin blog.csdn.net/weixin_37649168/article/details/104314201