Home  >  Article  >  Java  >  What are the three elements of java network programming

What are the three elements of java network programming

WBOY
WBOYforward
2023-05-05 13:49:061486browse

1. IP address is the identification of the device.

In order for computers in the network to communicate with each other, each computer must be assigned an identification number. This identification number is used to specify the computer to receive data and identify the computer sending it. The IP address It's this identification number. That is, the identification of the device.

2. Port is the identification of the application.

Network communication is essentially communication between two applications. Every computer has many applications, so how to distinguish these applications during network communication? If the IP address can uniquely identify the device on the network, then the port number can uniquely identify the application on the device. That is, the identity of the application.

3. Protocol, connection and communication rules are called network communication protocols. Common protocols include UDP protocol and 3. TCP protocol.

Multiple computers can be connected through a computer network. Computers located on the same network need to abide by certain rules when connecting and communicating. This is just like a car driving on the road must follow traffic rules. In computer networks, these connection and communication rules are called network communication protocols, which provide unified regulations on data transmission format, transmission rate, transmission steps, etc. Both communicating parties must comply at the same time to complete data exchange. Common protocols include UDP protocol and TCP protocol.

What are the basic data types of java

The basic data types of Java are divided into:

1. Integer type, used to represent the data type of integer.

2. Floating point type, a data type used to represent decimals.

3. Character type. The keyword of character type is "char".

4. Boolean type is the basic data type that represents logical values.

The above is the detailed content of What are the three elements of java network programming. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete