knowledge points

Java

winter vacation goal

use UDP to imitate TCP

1.1 The convertion between int,double,string

int to String

1
2
String s1=String.valueOf(int variable);
String s2=Integer.toString(int variable);

String to int

1
2
int i1=Integer.valueOf(String).intValue();
int i2=Integer.parseInt(string);

double to String

1
2
String s1=String.valueOf(double variable);
String s2=Double.toString(double variable);

String to double

1
2
double d1=Double.valueOf(String).doubleValue;
double d2=Double.parseDouble(string);

1.2 UDP

Compared with TCP

TCP ServerSocket Socket use “stream” to transfer
UDP Datagram Socket Datagram Packet

Data Structure

1.1

What is algorithm?
Algorithm is the finite sequence of the operation for solving problems.

What do D and S in “(D,S)” represent?
D represents data element.
S represents relationship.