Java基础介绍(英文)

In object-oriented terminology, a class is a term that describes a group or collection of objects with common properties. A class definition describes what attribute its objects will have and what those objects will be able to do. Attributes are the characteristics that define an object; they are properties of the object. The values contained in an object’s properties differentiate objects of the same class from one another. An object is a specific, concrete instance of a class.

When you create an object instance, you instantiate it.

In object-oriented classes, attributes and methods are encapsulated into objects that are then used much like real-world objects. Encapsulation refers to the hiding of data and methods within an object. Encapsulation provides the security that keeps data and methods safe from inadvertent changes. Programmers sometimes refer to encapsulation as using a “black box,” or a device that you can use without regard to the internal mechanisms. A programmer can access and use the methods and data contained in the black box but cannot change them. If an object’s methods are well written, the user is unaware of the low-level details of how the methods are executed, and the user must simply understand the interface or interaction between the method and the object.

Inheritance-the ability to create classes that share the attributes and methods of existing classes, but with more specific features.

Literally, polymorphism means “many forms”—it describes the feature of languages that allows the same word or symbol to be interpreted correctly in different situations based on the context.

Java can be run on a wide variety of computers because it does not execute instructions on a computer directly. Instead, Java runs on a hypothetical computer known as the Java Virtual Machine(JVM).

The Java compiler converts the source code into a binary program of bytecode. A program called the Java Interpreter then checks the bytecode and communicates with the operating system, executing the bytecode instructions line by line within the Java Virtual Machine. Because the Java program is isolated from the operating system, the Java program also is insulated from the particular hardware on which it is run. Because of this insulation, the JVM provides security against intruders accessing your computer’s hardware through the operating system. Therefore, Java is more secure than other languages. Another advantage provided by the JVM means less work for programmers—when using other programming languages, software vendors usually have to produce multiple versions of the same product so all users can run the program. With Java, one program version will run on all these platforms.

Java is based on Unicode, which is an international system of character representation. The term letter indicates English-language letters as well as characters from Arabic, Greek, and other alphabets.

An access specifies defines the circumstances under which a class can be accessed and the other classes that have the right to use a class.

Static means that a method is accessible and usable even though no objects of the class exist.

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值